As part of a private preview, we are now enabling Rust-based applications to benefit from Azure Sphere’s secure identity, update, and end-to-end encrypted communication services!
To me, the promise of Rust is the elimination or significant reduction of entire classes of software flaws. Forgot to initialize a variable? Nice explicit compiler errors! Want to try a null-pointer dereference? Not gonna happen! For embedded systems this is a lifeline, a pushback against the cost entropy of increasingly complex systems needing orders of magnitude more work and effort to come to market, even when they inherit from older code or integrate multiple open-source projects.
I first encountered Rust a number of years ago when I was building avionics systems for rockets. I had been an embedded C and C++ dev for most of my relatively short career, with some dabbling in the type-safe Ada language. Type safety appealed to me—safety of any kind appealed to me. The things I was working on were expensive, and, if I’m honest about my coding, I was aware of many, many mistakes I had made in prototypes over the years. We had tools and processes to weed out flaws during review, during static analysis, during basis path testing; we had fuzzers, and unit tests, and integration tests, and more. It all started to feel big and expensive, like every line of code had hundreds more backing it up to find its flaws. In the same way that many good things in tech come along, a friend came to me and said, “Hey, maybe there’s a better way.”
When Azure Sphere was launched, we chose to focus on C code customer applications. We hoped that C, being everywhere, would give our customers the most leverage for the amount of RAM and flash available to them on the MT3620 platform. Existing C code could be brought to the platform, decreasing time to market for our customers. General C++ support can be expensive in terms of memory footprint for supporting lots of libraries, and some other popular languages require just-in-time compilation which can be expensive to secure in terms of memory footprint with sandboxes or containerization, so our options were limited. Rust on Azure Sphere will begin with a private preview where interested customers can engage with the Azure Sphere team directly as we continue to build up this platform.
The MT3620 may be a small piece of silicon, but its ability to secure and protect products is continuing to grow, and we’re excited that Rust is now being explored as part of the Azure Sphere solution space. Not all things Rust will operate on Azure Sphere (the MT3620 has only 4MB of RAM), but this is an exciting new opportunity for the Azure Sphere platform and an important demonstration of how Azure Sphere capabilities continue to grow even after launch—and without any hardware changes.