> 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`:
-C soft-float -- use soft float ABI (*eabihf targets only)
> 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.
Sounds to me like the current state is "doable," but not "solid." I can convince myself to try it out, but not my whole company. But, maybe this will improve over time.
Also, if you do try Rust and find other issues that would be blockers for your company to pilot a project, I know that the teams have been very eager to get feedback from "systems" shops on what would be needed to get them trying Rust out commercially.
2. Yes, though it's kind of awkward.
3. There were some patches in the queue, I forget if/how they landed.
4. Yes.
5. Sort of. You have to rely on a tool to do it; they work reasonably well but aren't perfect yet.
6. Unless you're relying on something with a soundness hole, which we reserve the right to fix, and will be trivial to upgrade for you.
That's just not accurate. This is UB, despite being done entirely using modern C++ API:
#include <iostream>
#include <vector>
using namespace std;
int main() {
std::vector<int> v;
v.push_back(1);
v.push_back(2);
v.push_back(3);
v.push_back(4);
for (int i : v) {
v.push_back(5);
std::cout << i << std::endl;
v.push_back(6);
}
return 0;
}
I ran it on https://code.sololearn.com/caR4o14MOCWr/#cpp and got this output: 1
8519872
3
4
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 Rust score a resounding "YES" on ALL of the above questions?