The Agile Embedded Podcast
Rust with Milica Kostic
Episode Summary
In this episode, we sit down with embedded software architect Milica Kostic to discuss her journey from C/C++ to Rust and what it means for embedded development. Milica shares her experience adopting Rust in production environments, starting with an embedded Linux project using a microservice architecture that allowed for clean isolation of Rust code.
Episode Notes
In this episode, we sit down with Milica Kostic, an embedded software architect from Belgrade, Serbia, to discuss her journey from C/C++ to Rust and what it means for embedded development. Milica shares her experience adopting Rust in production environments, starting with an embedded Linux project using a microservice architecture that allowed for clean isolation of Rust code.
We explore the practical realities of learning Rust as an experienced C/C++ developer - yes, there's a learning curve, and yes, the compiler will slap you on the wrist frequently. But Milica explains how the development experience, with cargo as a package manager and built-in tooling for testing and static analysis, makes the journey worthwhile. She's candid about where Rust shines (embedded Linux, greenfield projects) and where challenges remain (microcontroller support, IDE tooling, vendor backing).
The conversation touches on the bigger question facing our industry: with memory safety becoming critical in our connected world, what role should Rust play in new embedded projects? While Milica takes a measured stance - acknowledging that C and C++ aren't going anywhere - she's clearly excited about Rust's potential, especially in safety-critical domains like medical devices. Whether you're Rust-curious or still skeptical, this episode offers a grounded perspective from someone who's actually shipped production code in Rust.
Key Topics
- [02:30] Milica's background in embedded systems and her journey from electrical engineering to embedded software development, with focus on safety-critical industries like medical devices
- [04:15] The path to adopting Rust: from first hearing about it in 2020 to finding a client project willing to embrace it, and the importance of having experienced Rust developers on the team
- [07:00] Choosing the right project for Rust adoption: embedded Linux with microservice architecture as an ideal starting point, avoiding complex C/C++ interoperability
- [10:45] The learning curve: getting used to the Rust compiler's strictness, discovering the ecosystem of unofficial but widely-used crates, and how learning Rust improved C++ skills
- [14:20] What makes Rust development pleasant: cargo as package manager, built-in testing and static analysis, cleaner code organization with modules, and writing unit tests alongside source code
- [17:30] Current limitations: lack of official vendor support for microcontrollers, community-driven development, potential gaps in certified stacks (like BLE), and IDE support challenges
- [20:15] Interfacing Rust with C and C++: C binding works well, C++ has limitations with inheritance and templates, and the safety considerations when using unsafe code blocks
- [25:40] Integrating Rust into legacy projects: when it makes sense (isolated new features requiring memory safety) and when it doesn't (just for experimentation), plus maintenance considerations
- [30:00] The big question: Is it irresponsible not to use Rust for new projects? Discussion of Philip Marcraff's strong stance and Milica's more nuanced view considering team knowledge, existing tooling, and project context
- [33:45] The influence between languages: how C++ is learning from Rust's memory safety features, and why the borrow checker is harder to retrofit than basic safety improvements
- [36:20] Rust in operating systems: adoption in the Linux kernel and Microsoft Windows, and major tech companies pushing C++/Rust interoperability forward
- [39:00] The future of Rust in embedded: Milica's view that C, C++, and Rust will coexist, each with their own use cases, advantages, and trade-offs
Notable Quotes
"Learning Rust has also made me a better C++ developer as well. Once you get used to those rules, you apply them in C++ as well." — Milica
"Just like writing Rust code is pleasant. It flows much nicer than or easier than it would with C++, for example. The way you organize your code, in my opinion, is also cleaner." — Milica
"If you are developing Rust for embedded systems on microcontrollers, you need to be aware that there is no official vendor support. Everything currently is open source and driven by the community." — Milica
"You definitely do not lose benefits of using Rust for the rest of your codebase when using a C library. That C library is isolated, and if there are some memory issues, then you know where to look." — Milica
"I think most of the benefits come from starting with Rust in the first place. So having a clean slate, starting a new product, new project with Rust. That's where you see the most benefits." — Milica
Resources Mentioned
- Embassy - An async framework used in embedded Rust projects, mentioned as a good starting point for greenfield embedded development
- Zephyr RTOS - Real-time operating system that is working on official Rust integration, though not fully there yet
- Rust Rover - JetBrains' official IDE for Rust development, released about a year and a half ago, though with some limitations for embedded development
- Zed - A new IDE written completely in Rust, mentioned as an emerging option for Rust development
- Slint - A Rust-based GUI framework for embedded systems
- Embedded Online Conference - Conference where Milica gave a talk on Rust for embedded systems - link to her presentation in show notes
- Milica's LinkedIn
- Milica's talk on Rust at the Embedded Online Conference