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

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -