|
|
|
|
|
by bmalehorn
3456 days ago
|
|
I am a systems programmer working at a company with a largely C++ codebase. We don't use Rust. It has nothing to do with the reasons mentioned in the article or this thread. Here are a list of requirements for us to use Rust: - Does it support all of the following architectures? x86_64, ARM, MIPS, powerPC
- Does it support soft float?
- Can it link against uclibc instead of glibc?
- Can it link against arbitrary C libraries?
- Can I use a C library's header.h file without having to hand-recode it to Rust?
- Will the code I write now continue to compile 5 years from now?
Does Rust score a resounding "YES" on ALL of the above questions? |
|
> Does it support all of the following architectures? x86_64, ARM, MIPS, powerPC
It does: https://doc.rust-lang.org/book/getting-started.html#tier-2. Granted, while tier 2 support is pretty good, it isn't the same level of support as the tier 1 platforms.
> Does it support soft float?
From running `rustc -C help`:
> Can it link against uclibc instead of glibc?It can link against musl, but I'm not sure whether that would enable uclibc. Probably?
> Can it link against arbitrary C libraries?
Yes.
> Can I use a C library's header.h file without having to hand-recode it to Rust?
You can use something like rust-bindgen (https://github.com/Yamakaky/rust-bindgen) which will work with a minimal amount of cleanup afterwards in my experience. Still not a resounding yes, though.
> Will the code I write now continue to compile 5 years from now?
Yes. See https://blog.rust-lang.org/2014/10/30/Stability.html for more about the plans/policies/etc.