Making Rust binaries smaller by default
21–30 of 199 posts
Re: Making Rust binaries smaller by default
#22Earlier quoted context omitted.
That’s almost never the case, though. Imagine if a C binary statically linked in libc. Adding a page full of more C to its code would only grow it a tiny amount.
I would hope that it could statically link libc and exclude the unreachable portions.
Re: Making Rust binaries smaller by default
#23Re: Making Rust binaries smaller by default
#24So what's in the remaining huge 415KB hello world program? Can we get rid of 90% of it a couple more times?
Re: Making Rust binaries smaller by default
#25Re: Making Rust binaries smaller by default
#26not a rust programmer. can someone explain why this is in the final binary and not in a shared library?
The Rust compiler statically links everything into a single binary. This can be changed, but is generally discouraged as there are no ABI stability guarantees at this point.
Re: Making Rust binaries smaller by default
#27[flagged]
Re: Making Rust binaries smaller by default
#28[flagged]
Re: Making Rust binaries smaller by default
#29"Rust tries to appeal to programmers coming from many different backgrounds, and not everyone knows that something like stripping binaries even exists."
When evaluating languages, you rarely look foor good enough results to work around.
Re: Making Rust binaries smaller by default
#30It's great to see rust maturing. That people care about binary size and work to improve it is a good sign.
Looks more like a systemic issue in the Rust development process to me tbh.
What's more shocking though is that even after a 90% size reduction, a vanilla hello world is still 415 KBytes. That's about 10..100x bigger than I would expect from a low level "systems programming language".