Rustによる新しい組込み開発 on Azure Sphere

Azure Sphereのデバイス開発でRust言語を使うことに関する見解がマイクロソフトブログにアップされていたので、気になる部分だけピックアップしてメモ。

techcommunity.microsoft.com

Rust and Azure Sphere are a good match – a programming language that can improve safety of code with strict compile time safety checks alongside Azure Sphere’s secure identity, update, and end-to-end encrypted communication services for internet-connected devices should provide greater security to the customer applications.

  • RustとAzure Sphereの組み合わせは良いぞ。
  • Azure Sphereの安全なID、更新、暗号化された通信サービスと、Rustのコンパイル時の厳格な安全性チェックで、アプリケーションはもっと安全に。

Low-level code is often prone to a variety of subtle bugs, which in most other languages can be caught only through extensive testing and careful code review by experienced developers. In Rust, the compiler refuses to compile code with these elusive bugs, including concurrency bugs.

  • 低レベルコードはさまざまなバグが発生しやすく、経験豊富な開発者によるテストやレビューでのみ発見される。
  • Rustはこれらバグをコンパイルで排除する。平行性に関するバグもね!

Rust endeavors to make safe code be fast code as well. Zero-cost abstractions ensure higher-level features compile to low-level code as fast as code is written manually.

  • Rustは高速。
  • ゼロコストの抽象化。高機能を手動で書くのと同じ速さの低レベルコードを生成する。

Like other Azure Sphere apps, ones built in Rust today are expected to be fully functional in 2031, regardless of security patches, fixes, and new features added to the Azure Sphere OS by then.

  • Azure Sphere OSでは、今日Rustで作ったアプリでも2031年まで完全に機能する予定。

Rust can be highly efficient, but by including many dependencies in the app itself, you may need to evaluate how a Rust implementation utilizes memory compared to a C-language app in some cases.

  • Rustはアプリ自身に多くの依存を含める。
  • メモリの使用量に注意。

Here is the link to the project – azure-sphere-gallery/Rust at main · Azure/azure-sphere-gallery · GitHub

Please feel free to engage with the Azure Sphere team directly

  • お気軽に(!)Azure Sphere チームに直接お問い合わせください

2023/1/14追記

Azure IoTと通信する部分は、現時点はAzure SDK for Rustを使うことになるが、unofficialなのとDAA非対応。Productionでの使用は避けた方が良いと思う。

https://github.com/Azure/azure-sphere-gallery/blob/main/Rust/rust/docs/relnotes.md

魚拓。

2023/1/14追記②

ちゃんと書かれていました。

azure-sphere-gallery/README.md at main · Azure/azure-sphere-gallery · GitHub

魚拓。