3 ms·
This is a very similar environment to the Linux kernel, and most of what this blog post suggests applies to Rust in Linux.
by monocasa 2y ago
This is a very similar environment to the Linux kernel, and most of what this blog post suggests applies to Rust in Linux.
- vlovich123 2y agoKind of, but Rust in Linux is already an effort that's way ahead of what this blog is talking about and has adapted itself to things specific to the Linux kernel whereas firmware environments are typically even more barebones.
- sophacles 2y agoFirmware is not new territory for rust at all. Oxide compiter has been making their firmware in rust for a few years, they even have an embedded OS (called hubris). This effort may ne new for Android, but its not a "break into a new area" type thing.
- monocasa 2y agoAnd in fact I've been giving more or less annual "State of Embedded Software on Rust" talks since 2017, and every time it has been running as slides on the Nintendo 64 written in Rust. Embedded software in Rust is pretty much as mature as C and C++ at this point. The vendor won't give you examples in Rust, but honestly their code generally barely works anyway and you end up rewriting it. Might as well rewrite for your use case in Rust.
- vlovich123 2y agoWith all due respect to the Oxide folks who are doing fantastic work and blazing the trail on rust development, the scale of Android devices is inherently much larger (potentially billions of devices will end up running this code)
- monocasa 2y agoHonestly this is way closer to a conventional Rust environment than the kernel gives you. In the kennel external crates are pretty much verboten, large chunks of alloc are verboten, no panicking is allowed, etc.