Thanks for this compiling info.
I encourage, again, this be explicitly put into the Rust Book so others are provided knowledge of this option in the documentation.
So here are the results using this compling option.
hello_world.rs
---------------------------
fn main() {
println!("Hello World!")
}
---------------------------
$ rustc -O -C prefer-dynamic hello_world.rs
$ strip hello_world
32-bit Linux 1.8 1.9
rustc 10,561 10,573
strip 5,568 5,568
dif 4,993 5,005
% dif 47.3 47.3
rust/strip 1.9 1.9
64-bit Linux 1.8 1.9
rustc 12,586 12,598
strip 6,304 6,304
dif 6,282 6,294
% dif 50.1 50.0
rust/strip 2.0 2.0
Now these results are much more reasonable, and pleasing.
I'm wondering though, since you've acknowledged excessive binary sizes have been
brought up before, have you taken these issues raised by Users to heart?
This example demonstrates Rust has a standard way to create orders of magnitude
smaller binaries over the default method, so the question becomes why isn't this
the defualt compiler method?
The answer to this seems to reside more in the realm of philosophy than technology.
But I'm pretty sure 999,999 out a million users would prefer having binaries that are
50-100 times smaller than what the current default compiling process produces. Don't you?
I also cant' help but think it would be a much better marketing feature, and attractive to
more Users in more domains of uses, to demonstrate a 5-6KB Hello World!
program than a 500-600KB one.