In mid-2017, I came across this project by James Munns. It essentially wraps the C SDK for nRF52 development boards, and provides bindings that can be called from Rust. James gave a talk to the Rust DC Meetup, remotely over video conference. This talk inspired me to buy a couple of nRF52 dev boards.
I'd like to announce that here, in Nordic's official channels, because I'd like more embedded developers to become aware of it. Rust is a language that has the ability to compile down to native code with zero runtime, and no operating system. In other words, Rust can run on bare metal hardware. Today.
Some challenges we will face (you can help!):
If you are interested, here are some links to learn more:
Here is a link to the GitHub repository
Here is a link to the full video recording of the DC Meetup talk. It offers a detailed overview of our embedded development workflow.
Finally, here is a recent talk about using "unsafe" code in Rust. This is relevant, because in the embedded context a lot of code involves usage of the unsafe keyword. This talk explains why that's necessary and not as scary as it sounds.
Manufacturer support? Ha! C++ has been a far better choice for embedded code for a very long time, but the industry still insists on C. I use C++ exclusively on Çortex-M devices, and have benefited greatly in terms of development time, reliability, readability, maintainability, and so on. Rust is interesting, but immature. C programmers can segue into C++ much more easily and gain essentially all the same benefits.
Seems pretty doable to me, although I'm not sure how much total time that would Assignment Spot take out of his schedule, and I'm also not accounting for equations and diagrams, which might be more time consuming.
Edit: Actual embedded book here: rust-embedded.github.io/.../introduction.html
It's nice that the nRF52 repo above demonstrates interoperability with the Nordic Softdevices, as thats likely to be a requirement for many using the Nordic parts.Looks like there is work on an embedded book specific to rust as well, I've been following this: doc.rust-lang.org/.../ch00-00-introduction.html
I'm also following this topic with interest, as we're starting a new project on the nRF52 platform, and would like to use Rust if we can gain confidence that we can access the required `nrfx` level functions, and coexist application code with a Softdevice (which James Munn's repo does appear to do).