Skip to content
0:00 / 0:00

#binarysize#staticlinking#debugsymbols

Why Hello World in Rust is 200 times bigger than in C, and why it isn't

Valigo

12K subscribers • 2 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.

Intermediate. Assumes working knowledge.

86K views11 months ago2 recommendations

Systems programmingProgramming languagesRustCCompilers and interpreters

An explanation of why Rust binaries are larger than C binaries by default and how to optimize them for size.

Sorry for the awful editing lol. Subscribe and all that, I stream programming here and on twitch.

Why it's here

2 people recommend this

What people say. Recommended for explaining how static linking and debug information affect Rust binary sizes compared to C.

u/Difficult-Fee5299in r/Zig • Recommends

On “Why are zig binaries so small compared to other languages?”

link to this video Rust binary can be much smaller.

u/juhotuho10in r/Zig • Recommends

On “Why are zig binaries so small compared to other languages?”

Why Hello World in Rust is 200 times bigger than in C, and why it isn't TL;DR: Rust statically links STD and includes a ton of debug information in the binaries that isn't present in C binaries, Dynamically linked Rust binaries without any debug information become comparable or even slightly smaller than C binaries