Tighten rust’s belt: shrinking embedded Rust binaries
Tighten rust’s belt: shrinking embedded Rust binaries
复制标题
勒紧 rust 的腰带:缩小嵌入式 Rust 二进制文件
DOI:
10.1145/3519941.3535075
复制
发表时间:
2022
期刊:
影响因子:
--
通讯作者:
Van Why, Johnathan
中科院分区:
文献类型:
--
作者:
Ayers, Hudson;Laufer, Evan;Mure, Paul;Park, Jaehyeon;Rodelo, Eduardo;Rossman, Thea;Pronin, Andrey;Levis, Philip;Van Why, Johnathan
Rust is a promising programming language for embedded software, providing low-level primitives and performance similar to C/C++ alongside type safety, memory safety, and modern high-level language features. We find naive use of Rust leads to binaries much larger than their C equivalents. For flash-constrained embedded microcontrollers, this is prohibitive. We find four major causes of this growth: monomorphization, inefficient derivations, implicit data structures, and missing compiler optimizations. We present a set of embedded Rust programming principles which reduce Rust binary sizes. We apply these principles to an industrial Rust firmware application, reducing size by 76kB (19%), and an open source Rust OS kernel binary, reducing size by 23kB (26%). We explore compiler optimizations that could further shrink embedded Rust.
登录
查看更多内容
DOI:
10.1109/ancs.2019.8901892
发表时间:
2019
期刊:
2019 ACM/IEEE Symposium on Architectures for Networking and Communications Systems (ANCS)
影响因子:
--
作者:
Paul Emmerich;Simon Ellmann;Fabian Bonk;A. Egger;Esaú García Sánchez;T. Günzel;Sebastian Di Luzio;Alexandru Obada;Maximilian Stadlmeier;Sebastian Voit;G. Carle
通讯作者:
G. Carle
DOI:
10.1007/3-540-49201-1_16
发表时间:
1999
期刊:
1999 IEEE/ACM International Conference on Computer-Aided Design. Digest of Technical Papers (Cat. No.99CH37051)
影响因子:
--
作者:
H. Xi
通讯作者:
H. Xi
DOI:
10.1145/3302516.3307346
发表时间:
2019
期刊:
Proceedings of the 28th International Conference on Compiler Construction
影响因子:
--
作者:
James Renwick;T. Spink;Björn Franke
通讯作者:
Björn Franke
DOI:
--
发表时间:
1994
期刊:
ACM-SIGPLAN Symposium on Programming Language Design and Implementation
影响因子:
--
作者:
J. Knoop;Oliver Rüthing;B. Steffen
通讯作者:
B. Steffen
DOI:
10.1145/3461648.3463852
发表时间:
2021
期刊:
--
影响因子:
--
作者:
Rocha R
通讯作者:
Rocha R