I ported range-set-blaze
to embedded (after porting to WASM). Here are some "findings":
The Good:
-
"If it compiles, it works” works (unlike with WASM).
-
Many items removed by
no_std
are available viacore
andalloc
. -
With QEMU, you can develop for embedded systems without hardware.
The Bad:
-
#[test]
doesn't run tests on embedded. Instead, I created a new subproject and wrote a few tests. -
Finding
no_std
-compatible dependencies can be challenging butcargo tree
helps.
For a full writeup (including setting up tests via emulation and other tips) see 9 Rules for Running Rust on Embedded Systems.
Overall, I've found using Rust with embedded fun and have used it in several microcontroller projects.
Is there a better way test embedded Rust?