Comment by 1718627440
2 months ago
Yes, Hello World is 10MB in Rust even when optimizing for size. Hello World in C is 16kB, even after static linking everything including GNU libc, it's only 810kB. I really wonder what that large program does.
This program is still dynamically linked:
linux-vdso.so.1 (0x00007ffe6d8fd000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb0a62c6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb0a60f2000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb0a636d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb0a60d0000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb0a60ca000)
Not sure, why it needs all these dependencies, this is C Hello World:
linux-vdso.so.1 (0x00007fffea181000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faebae6a000)
/lib64/ld-linux-x86-64.so.2 (0x00007faebb087000)
And I think the C binary is already bloated.
To stress it again: The Rust Hello World program is 2.5-times larger then the whole Git executable with functionality of 20 years!
No comments yet
Contribute on Hacker News ↗