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 - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -