4 ms·
There's a Rust FAQ entry on file sizes[1], but it also sort of glosses over that Rust defaults to static compilation. Go does as well, and I believe Go does as
by kbenson 9y ago
There's a Rust FAQ entry on file sizes[1], but it also sort of glosses over that Rust defaults to static compilation. Go does as well, and I believe Go does as well. Part of the size of executables can be attributed to these languages implementing their own libc equivalents (or wrapping libc). The stories probably fairly nuanced as each language has it's own story, but that's the general idea.
1: https://www.rust-lang.org/en-US/faq.html#why-do-rust-programs-have-larger-binary-sizes-than-C-programs https://www.rust-lang.org/en-US/faq.html#why-do-rust-program...
- vram22 9y agoThanks. >Part of the size of executables can be attributed to these languages implementing their own libc equivalents (or wrapping libc). Yes, I agree. Both of them have more features and I guess (I know it a bit for Go, not sure for Rust) do some more / higher level things than plain C, which may partly be why they need to wrap libc (or implement the equivalent) with non-trivial additional code.