嵌入式Rust或C固件?工业微控制器用例经验教训
Embedded Rust or C Firmware? Lessons from an Industrial Microcontroller Use Case

原始链接: https://arxiv.org/abs/2604.25679

本文展示了一个真实案例研究,比较了在工业微控制器上使用Ariel OS开发固件时Rust和C的性能。两个团队在数月内同时实现了相同的功能——一个使用Rust,另一个使用C。 研究发现,在这种情况下,**C在性能和内存占用方面没有显著优势** 优于Rust。事实上,基于Rust的系统运行时Ariel OS,展示了**比传统的裸机C堆栈更小的占用空间**。 该研究表明,**Rust是目前微控制器固件开发的可行且可靠的选择**,挑战了C在该领域长期以来的主导地位假设。这为采用Rust以提高嵌入式系统的安全性和可靠性提供了令人鼓舞的证据。

相关文章

原文

[Submitted on 28 Apr 2026]

View a PDF of the paper titled Embedded Rust or C Firmware? Lessons from an Industrial Microcontroller Use Case with Ariel OS, by Bipin Thapa and 6 other authors

View PDF
Abstract:As Rust gains traction for developing safer systems software, a reality check for the microcontroller hardware segment becomes necessary. How ready is the Rust ecosystem for this segment? Can Rust compete with C in practice? This paper reports on an IoT industrial case study that contributes to answering these questions. Two teams concurrently developing the same functionality (one in C, one in Rust) are analyzed over a period of several months. A comparative analysis of their approaches, results, and iterative efforts is provided. The analysis and measurements on hardware indicate no strong reason to prefer C over Rust for microcontroller firmware on the basis of memory footprint or execution speed. Furthermore, Ariel OS is shown to provide an efficient and portable system runtime in Rust whose footprint is smaller than that of the state-of-the-art bare-metal C stack traditionally used in this context. It is concluded that Rust is a sound choice today for firmware development in this domain.
From: Emmanuel Baccelli [view email]
[v1] Tue, 28 Apr 2026 14:09:11 UTC (1,426 KB)
联系我们 contact @ memedata.com