Reducing binary size of (Rust) programs with debuginfo
kobzol.github.io·1d·

TL;DR: There are some ways how you can reduce the binary size of (Rust) programs that contain debug information.

Perhaps contrary to popular belief, Rust binaries can actually be quite small if you spend some effort on it. However, once you start including debug information (debuginfo) in them, the binary sizes typically start increasing at an alarming rate.

If you wonder why we should care about binary size when debuginfo is enabled, as that’s typically used for debug builds, it is also commonly used for distributing release/production binaries that include at least debug line tables, which are needed to produce quality backtraces.

In this post, I’ll shortly describe why debuginfo takes …

Similar Posts

Loading similar posts...