Applications built with the Rust programming language ( https://www.rust-lang.org/ ) have become very popular lately in the safety industrial ecosystem. The typical way to design a computer system that runs Rust applications is with a MPU running Linux. We think that for our applications, the performance of a higher-end i.MX RT would be more than sufficient. The issue that we see presently is that NXP does not offer a tested solution for enabling Rust applications on the i.MX RT.
Can anyone recommend a solution that is KNOWN to work well on a higher-end i.MX RT? And on which RTOS (FreeRTOS, Zephyr, etc?) would the solution work?
I spent some time searching online to see if others have already tried implementing Rust applications on a microcontroller RTOS instead of Linux. The results are below. None of the below solutions appear in my opinion to be fully trustworth, so I would greatly appreciate comments about success or failures using these or other methods
imxrt-hal
Rust for NXP i.MX RT
https://github.com/imxrt-rs/imxrt-hal
svd2rust
Generate Rust register maps (`struct`s) from SVD files
https://github.com/rust-embedded/svd2rust
https://community.nxp.com/t5/i-MX-RT/Is-there-an-SVD-file-for-i-MXRT1050/m-p/772462
freertos-rust
Create to use FreeRTOS in rust projects. The freertos-cargo-build crate can be used to build and link FreeRTOS from source inside build.rs.
https://crates.io/crates/freertos-rust
https://github.com/lobaro/FreeRTOS-rust
freertos.rs
A Rust wrapper for FreeRTOS.
http://www.hashmismatch.net/freertos-meets-rust/
https://github.com/hashmismatch/freertos.rs
zephyr-rust
Rust on Zephyr RTOS
https://github.com/tylerwhall/zephyr-rust
cbindgen
Embedding Rust Into Zephyr Firmware Using C-bindgen
https://www.jaredwolff.com/embedding-rust-into-zephyr-using-cbindgen/
A project for generating C bindings from Rust code
https://github.com/eqrion/cbindgen