Earlier quoted context omitted.
Yup same. Also I hate the "just strip it" advice. I don't know who on earth strips random binaries and has them actually work fine afterward 100% of the time. Stripping after linking frequently breaks binaries I try it on.
All binaries on a classic Linux distro are stripped (you can use 'file' to quickly check some), so your issues might be worth reporting
Making Rust binaries smaller by default
11–20 of 199 posts
Re: Making Rust binaries smaller by default
#12Re: Making Rust binaries smaller by default
#13Initial binary size, like of a hello world, is a great indicator of how much abstraction the language has that youre also paying for. For example, java has to set up a constants pool, parse it from the classfile, run init and cinit, resolve references, allocatea a frame, and so on, just to get to the entrypoint. Compared to C without stdlib which needs to basically just run a few bytes to syscall write(). There are o…
I'm not trying to be rude, but what does your comment have to do with the actual article linked. I suspect you're commenting based solely on the title? If you read the article it mentions 90% reduction if you remove the debug symbols from the rust std lib that get bundled in the final hello world binary. A conversation about Java's size and abstraction is quite irrelevant to the article.
Re: Making Rust binaries smaller by default
#14Earlier quoted context omitted.
All binaries on a classic Linux distro are stripped (you can use 'file' to quickly check some), so your issues might be worth reporting
Stripped via -s or via strip?
Re: Making Rust binaries smaller by default
#15Re: Making Rust binaries smaller by default
#16[flagged]
And it isn’t like release builds with debug symbols are a bad thing. Getting good bug reports matters, too.
Re: Making Rust binaries smaller by default
#17> I can imagine a situation where a seasoned C or C++ programmer wants to try Rust, compiles a small program in release mode, notices the resulting binary size, and then immediately gives up on the language and goes to make fun of it on the forums. While I'm not a seasoned C or C++ programmer I have definitely done this to a few new languages when playing around with them. My thought was "If helloworld.rust is this l…
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.
Re: Making Rust binaries smaller by default
#18Re: Making Rust binaries smaller by default
#19not a rust programmer. can someone explain why this is in the final binary and not in a shared library?
Re: Making Rust binaries smaller by default
#20Earlier quoted context omitted.
Stripped via -s or via strip?
I never understood why strip's "--strip-unneeded" flag wasn't the default. Leaving that out can often enough give you a binary that just doesn't work.