4 ms·
By default Rust statically links the standard library into every program. For binaries it also statically links to jemalloc by default to use as the allocator.
by tatterdemalion 11y ago
By default Rust statically links the standard library into every program. For binaries it also statically links to jemalloc by default to use as the allocator. This is a large constant factory that makes trivial programs significantly larger than C, but like all constant factors it becomes insignificant when n is larger.
Binary size is not a major concern for most programs, even those written in a systems language. If it is a concern for your use case, you can use dynamic linking and the system allocator to get the size down to the same scale as C.