If you use #![no_std]
in Rust code, you can not use the standard library.
Simply put, the Rust compiler knows bare metal targets (architecture specific, no OS and no standard lib) and targets supporting an operating system (architecture specific, OS specific and with standard lib). For the later and in case of RTEMS someone needs to port the Rust standard lib to use RTEMS and to create and support a target at the Rust community.
The only Rust target available for RTEMS with standard library is armv7-rtems-eabihf
at the time of writing.
Please see also,
- RTEMS User Manual – section Rust
- The paper linked in the post Paper: Viability of Rust for Avionics Software Development – Current status and way forward – among other things it discusses creating a Rust target for RTEMS.
- Rustc book – section Platform Support – i.e. avialbale Rust targets
armv7-rtems-eabihf
target documentation