Really Small Rust
summary
Claims that Rust runs on tiny firmware with only kilobytes of resources and shipping hardware get proved with concrete numbers and tools: building for a 37¢ STM32C011 yields an empty release binary of ~260 B (192 B vector table, 68 B code including 60 B runtime startup), measured with cargo, size, readelf and nm; turning on LTO and opt-level = "s" and using panic-halt vs semihosting (≈4 KB cost) changes flash by kilobytes; examples include Hubris OS and oxide firmware with 1–1.5 KB demos and practical tips like monomorphization hacks, const vs static and zero-init to avoid flash bloat.
AI-written summary · about
chapters (17)
- 0:00Introduction to scaling down
- 0:35Microcontrollers explained
- 1:38Inside the chip package
- 2:55Integration and features
- 4:04Understanding constraints
- 5:05Why choose modern chips
- 6:24Compiling Rust for small chips
- 7:29Analyzing binary contents
- 8:26Inlining and optimizations
- 10:49Configuration for small code
- 11:47Handling panics
- 14:13Writing idiomatic small code
- 17:28The role of unsafe
- 17:54Const versus static
- 19:16Managing zero-initialized RAM
- 21:54Passing data by reference
- 23:11Conclusion and resources
related talks
26mIntroducing Rust into a Legacy Embedded System
46mIntroduction to Embedded Rust
54mUnwrap()Ing Rust on Embedded Linux
36m"To the Stratosphere and Beyond: Rust at 100,000ft"
31mGetting Something for Nothing
50mHow Rust makes Oxide possible
21mRust - Cargo Cult?
01h 00mFrom Tiny Chips to Server Racks: Deploying AI Everywhere with Rust
