Created
August 5, 2018 18:10
-
-
Save rhizoome/76348c6b2362759a4f68a4f6ecd1e916 to your computer and use it in GitHub Desktop.
Smallest rust binary size in stable (using musl based OS)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$> rustc -C opt-level=2 -C lto=fat hello.rs; strip hello; ls -lh hello | |
-rwxr-xr-x 1 ganwell ganwell 150.2K Aug 5 20:08 hello |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
println!("Hello World!"); | |
} |
In nightly use -C opt-level=z and
#![feature(alloc_system)]
extern crate alloc_system;
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use x86_64-unknown-linux-musl on gnu system