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 enc

Previewing Rust on Azure Sphere

submited by
Style Pass
2022-06-22 06:30:16

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. 

Leave a Comment