This is a rust re-implementation of an embedded C project I did a while ago: AmbientSensor.
Schematics, photos, ect. will be in that repository, this repository is just for the rust firmware.
This is still a work in progress.
Co-workers kept hyping up this new rust language, and I wanted to see if the hype was warranted.
On paper rust seems amazing, but the only way to really evaluate a language is to use it. I specifically wanted to compare embedded rust to embedded C, and AmbientSensor was simply the last embedded project I completed in C.
Turns out, the hype was warranted.
There is not a lot of commentary I can offer about embedded rust that has not already been said. The concepts rust introduces (safety, ownership, lifetimes) make developing robust code simple. The language is new and still has a small (but rapidly growing) ecosystem for embedded development. From my experience a lot of embedded development is still C simply because nothing else offers a compelling reason to switch (except C++ depending on who you ask). The features rust brings to the table are incredibly compelling for embedded development, and I think rust has a bright future in this industry.
You will need rustup and the thumbv6m-none-eabi
target.
rustup target add thumbv6m-none-eabi
After you have that target available you can build, the default target is already set in .cargo/config.toml
.
cargo build