3 ms·
Is alpine really going for “small” though? I’m not saying they’re not small and haven’t done a fantastic job, but my impression is that this is due to being mo
by dijit 5y ago
Is alpine really going for “small” though?
I’m not saying they’re not small and haven’t done a fantastic job, but my impression is that this is due to being mostly minimal in the default install;
The reason I say this (and I could be wrong) is because the use of musl for the libc means each binary kinda needs to include it’s own libc statically.
This must make the binaries huge!
Also, you can easily make small rust binaries, it’s Golang (of the two) that produces very large binaries.
If you just follow the first two bits of advice from: https://github.com/johnthagen/min-sized-rust https://github.com/johnthagen/min-sized-rust you’ll reduce your binary sizes to near C++ levels.
- AndyKelley 5y ago> the use of musl for the libc means each binary kinda needs to include it’s own libc statically. This is factually incorrect. Musl supports dynamic linking and if you run `ldd` on any binary in Alpine you can see that it dynamically links against musl libc.
- dijit 5y agoAh, fair enough. I did a little more digging and it seems you can dynamically link rust binaries too now: https://github.com/rust-lang/compiler-team/issues/422 https://github.com/rust-lang/compiler-team/issues/422
- deleted 5y ago[deleted]
- psd1 5y agoIn your link, I really enjoyed this link on creating a 45-byte executable: http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm...