← Back to context

Comment by Lvl999Noob

1 day ago

Fwiw, in something like hello world, most of the size is just the rust standard library that's statically linked in. Unused parts don't get removed as it is precompiled (unless there's some linker magic I am unaware of). A C program dynamically links to the system's libc so it doesn't pay the same cost.

You can statically link a C program and only parts of libc that are used are included in the binary.