There are a few factors that contribute more or less to this. In no particular order:
- many dependencies badly handle additional, potentially unwanted features (many aren't optional at all and take runtime checked branches)
- lto is disabled by default on release builds
- release builds still bundle a lot of debug info (should only affects binary, not memory size)
- backtracing on panic pulls in a big backtracing library, formating code and string literals
Enabling lto shaved off 10mb of my build just now
There are a few factors that contribute more or less to this. In no particular order:
- many dependencies badly handle additional, potentially unwanted features (many aren't optional at all and take runtime checked branches)
- lto is disabled by default on release builds
- release builds still bundle a lot of debug info (should only affects binary, not memory size)
- backtracing on panic pulls in a big backtracing library, formating code and string literals
Enabling lto shaved off 10mb of my build just now