4 ms·
Embedded and especially bare-metal applications really are 2nd class citizens in the rust ecosystem though. You basically can't use cargo (or at least not witho
by simias 12y ago
Embedded and especially bare-metal applications really are 2nd class citizens in the rust ecosystem though. You basically can't use cargo (or at least not without a whole bunch of hacks) and many important features for low-level code are still gated and won't be available for 1.0.
I think it's a bit of a shame because that's basically the #1 differentiator with languages like Go or Java as far as I'm concerned.
But beyond that it's true that the language itself has a lot of potential for embedded applications. The runtime can be made almost as tiny as C's and with libcore you get a much nicer and safer "bare metal" environment than what you'd get in C. And thanks to LLVM you can easily target a whole bunch of architectures.
- steveklabnik 12y ago> You basically can't use cargo (or at least not without a whole bunch of hacks) and many important features for low-level code are still gated and won't be available for 1.0. Yup, both of these things are true. This is what I meant by increased support: we have a long way to go to make it as nice to use, and on a stable release of Rust. But the fundamentals are in place.
- tshepang 12y agoWhy can't one use Cargo for bare-metal applications?
- steveklabnik 12y agoSee all the extra work that had to be done here: https://github.com/Ogeon/rust-on-raspberry-pi https://github.com/Ogeon/rust-on-raspberry-pi