This crate facilitates the most common Rust programming APIs to be used under no_std
MCU firmware development.
Specifically, it provides:
- a
no_std
equivalent of the standard Rust APIs such asprintln!
,alloc::{boxed::Box, vec, vec::Vec}
, andio::{Cursor, Seek, SeekFrom, Write, ...}
assuming that the#[global_allocator]
requirement can be satisfied by using target MCU'smalloc()
andfree()
C API. - base implementations of
#[panic_handler]
and#[alloc_error_handler]
that are required whenno_std
Rust code is based on the custom#[global_allocator]
above.
For a practical firmware example based on RIOT-OS, see the xbd-base demo.
This crate requires Rust nightly.