tormol/tiny-rust-executable
View on GitHub ↗ ★ 18 Assembly
Using Rust to make a 137-byte static AMD64 Linux executable
11 mentions on Hacker News by 2 people: 0 stories, 11 comments · first 2018-09-22 · latest 2026-07-09
20082026
-
> way too big https://github.com/tormol/tiny-rust-executable This produces a 137 byte binary. Obviously AMD64 isn't used in embedded, but I've seen ARM ones that are in the ~256 range. It's all in how you use it. Of course, if you don't…
comment by steveklabnik · 2026-07-09 · in Rewriting Bun in Rust -
https://github.com/tormol/tiny-rust-executable got it to 137, but here's a blog post explaining the process to get it to 151: http://mainisusuallyafunction.blogspot.com/2015/01/151-byte-...
comment by eat_veggies · 2021-12-01 · in This shouldn't have happened: A vulnerability postmortem -
…really a fair comparison. The smallest "hello world" binary rustc has ever produced was 137 bytes. https://github.com/tormol/tiny-rust-executable
comment by steveklabnik · 2021-01-03 · in Rust is now overall faster than C in benchmarks -
…for Rust is effectively the same as in C; the smallest binary rustc has produced is 137 bytes https://github.com/tormol/tiny-rust-executable The defaults do not focus on size reduction because we aren't in the 1970s anymore, though, it's…
comment by steveklabnik · 2020-10-21 · in Cargo-style dependency management for C, C++ and other languages with Meson -
The smallest Rust binary that does something that I've ever seen is 145 bytes https://github.com/tormol/tiny-rust-executable (I saw a wasm one get a bit lower but that isn't really apples to apples)
comment by steveklabnik · 2020-05-31 · in Bootable minesweeper game in a 512-byte boot sector -
https://github.com/tormol/tiny-rust-executable (See also http://mainisusuallyafunction.blogspot.com/2015/01/151-byte-... which was the original implementation, this shaved a few more bytes off)
comment by steveklabnik · 2020-01-05 · in Hello World -
…known one was 145 bytes. Some defaults were recently adjusted to make them smaller by default too. https://github.com/tormol/tiny-rust-executable
comment by steveklabnik · 2019-09-10 · in Why Ada Is the Language You Want to Be Programming Your Systems With -
…and it's not near the top of the list. That said, the smallest executable produced is 145 bytes: https://github.com/tormol/tiny-rust-executable
comment by steveklabnik · 2018-11-25 · in Still in love with Rust -
…have done more work since then; the smallest binary rustc has ever produced is now 145 bytes: https://github.com/tormol/tiny-rust-executable
comment by steveklabnik · 2018-10-09 · in The benefits and costs of writing a POSIX kernel in a high-level language -
…But that was before 1.0. Updating the example and applying some more tweaks, it’s down to 145: https://github.com/tormol/tiny-rust-executable
comment by steveklabnik · 2018-09-22 · in A Programming Language Underdog