Hosting Embedded Rust Apps on Apache Mynewt with STM32 Blue Pill
medium.com
medium.com
Thanks for the interesting article, I enjoyed reading it.
Like the Mynewt Sensor Framework. It really saves you a lot of trouble when building IoT devices. Just pick a sensor driver from their library, and Mynewt handles all the sensor polling for you...
https://mynewt.apache.org/latest/os/modules/sensor_framework...
Adding Rust to the core Mynewt OS may cause "Abstraction Bloat", I think. We will start adding layers of wrappers on top of bare metal to make the OS look tidily object-oriented, to fit all past, present and future microcontrollers, peripherals, data interfaces, ... Then add another layer to make it easy for app developers to call.
No offence to the Embedded Rust community, but I fear that Mynewt with Rust will become a complicated OS with this GPIO code...
https://rust-embedded.github.io/book/static-guarantees/desig...
The best way forward I think: Get embedded app developers to move away from C and port their embedded apps to Rust. Build the apps with safe Rust wrappers on top of the OS.
Once we figure out what kind of APIs the embedded Rust apps really need (e.g. Sensor Framework), then we dig deeper and restructure the OS with Rust. This could work with any embedded OS: Mynewt, Zephyr, FreeRTOS, ...
But really... we have suffered with C for so many years, why haven't we moved on to Rust?