Interoperability
std::os::raw
deals with low-level primitive types that canbe converted implicitly by the compilerbecause the memory layout between Rust and Cis similar enough or the same.
provides some utility for converting more complextypes such as Strings, mapping both &str
and String
to C-types that are easier and safer to handle.
As mentioned above, primitive types can be convertedby the compiler implicitly.
A common requirement for including Rust in your embedded project is combiningCargo with your existing build system, such as make or cmake.
Interoperability with RTOSs
Integrating Rust with an RTOS such as FreeRTOS or ChibiOS is still a work inprogress; especially calling RTOS functions from Rust can be tricky.
We are collecting examples and use cases for this on our issue tracker in.