Why does the Rust compiler generate huge executables? -


compiling simple hello world application this:

fn main() {     println!("hello, world!"); } 

generates relatively huge 822 kb executable using default compiler options (rustc hello.rs).

why happen , best way reduce size of executable?

  1. the standard library linked statically default. can change passing -c prefer-dynamic option compiler.

  2. rust still young language incompletely optimized compiler. there still lot of room left improvements in compilation speed, code speed , size, wording of error messages , on.


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -