3 ms·
I like Rust, but gosh it produces the second-biggest bloated binaries I've ever seen. Are you building in "release" mode? The debug builds can be 10x bigger.
by Animats 5y ago
I like Rust, but gosh it produces the second-biggest bloated binaries I've ever seen.
Are you building in "release" mode? The debug builds can be 10x bigger.
cargo build --release
You still get stack backtraces and subscript checking.
- wizzwizz4 5y agoIt's not releasing that's the problem; it's developing. Development is much harder with the release profile, because stuff like overflow checks are disabled. But yes, I have tried my own custom debug profile that turns on the optimisations to try to get the size down. The final binary is smaller, but `cargo build` still regularly leaves me with just kilobytes of space remaining, and then fails outright until I `cargo clean` and try again (which I think is build script related).