3 ms·
I wonder if Mynewt would consider adding Rust code to the OS core code. It would probably complicate the build process and other things and I'm not sure it woul
by eberkund 7y ago
I wonder if Mynewt would consider adding Rust code to the OS core code. It would probably complicate the build process and other things and I'm not sure it would be worth it for this type of programming.
Thanks for the interesting article, I enjoyed reading it.
- lupyuen 7y agoThanks :-) I'm not speaking on behalf of the terrific Mynewt team, but I feel that Mynewt is already a great embedded RTOS with many well-crafted low-level APIs, done in C. 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/sensor_framework.html 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/design-contracts.html 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, ...