Open
Description
Hi!
I noticed that current Cargo Release profile consists of enabling debug information. As far as I can understand, it was introduced in this commit 3 years ago. I guess that settings can be changed nowadays to something more optimal like building by default without debug info. This script also doesn't enable more optimizations.
Additionally, I suggest enabling optimizations like Link-Time Optimization (LTO) and codegen-units = 1
(CG1).
I've made quick local tests. My env: AMD Ryzen 9 5900x, Fedora 42, Rust 1.86, I used this build instruction.
Results:
- Current Release (with enabled debug info): 139 Mib, clean build time: 1m 03s
- Release (without debug): 16 Mib, clean build time: 59s
- Release (without debug) + Fat LTO + CG1: 13 Mib, clean build time: 1m 25s
Thank you.