Why We Choose Rust for IoT Projects
January 2026 • 8 min read
When we started building IoT devices at Creworker, we used C like everyone else. After two years of production deployments and countless debugging sessions, we've transitioned to Rust as our primary language for embedded systems. Here's why.
The Problem with C in 2026
C has been the lingua franca of embedded systems for decades. It's fast, it's low-level, and every microcontroller has a C compiler. But it comes with significant costs.
We've spent more time than we'd like to admit debugging:
- Buffer overflows that only manifest in production
- Use-after-free bugs that crash devices weeks after deployment
- Race conditions in interrupt handlers
- Memory leaks that slowly degrade performance
These aren't hypothetical problems. They're real bugs we've shipped, debugged, and fixed - often at significant cost to our clients and our reputation.
Enter Rust
Rust's ownership system catches these bugs at compile time. The same performance as C, but with memory safety guarantees that make buffer overflows and use-after-free bugs impossible.
Key Benefits We've Experienced
- Zero memory bugs in production: Not a single memory safety issue since switching
- Confident refactoring: The compiler catches breaking changes
- Better code quality: Rust's type system encourages good design
- Modern tooling: Cargo, rust-analyzer, and excellent documentation
The Ecosystem Has Matured
Two years ago, embedded Rust was experimental. Today, we have:
- ESP-RS: Excellent support for ESP32 chips
- Embassy: Async runtime for embedded systems
- probe-rs: Modern debugging tools
- defmt: Efficient logging for constrained devices
The tooling is now good enough that we're more productive in Rust than we were in C.
When We Still Use C
We're pragmatic, not dogmatic. We still use C when:
- The client's existing codebase is in C
- The target MCU doesn't have good Rust support
- Time pressure requires using existing C libraries
But for new projects where we have a choice, Rust is our default.
Getting Started
If you're considering Rust for your next embedded project, we recommend:
- Start with the Embedded Rust Book
- Try a simple project on an ESP32 or STM32
- Join the Rust Embedded working group community
The learning curve is real, but the payoff is worth it.
Interested in discussing your IoT project? Get in touch.