zamazan4ik
Hi! I see that the project already uses ThinLTO in the Dist profile in the root `Cargo.toml` file. However, ThinLTO is usually less efficient from the perspective of performed optimizations than Fat (aka Full) LTO. Additionally, I suggest enabling `codegen-units = 1` (CG1) too. Enabling more advanced optimizations allows us to reduce the binary size further (always a good thing) and improve the application performance more. E.g. `watchexec` [uses](https://github.com/watchexec/watchexec/blob/main/Cargo.toml) such optimization flags. Basically, it can be enabled with the following change: ``` [profile.dist] inherits = "release" codegen-units = 1 lto = true ``` I have made quick local tests (AMD Ryzen 5900x, Fedora 41, Rust 1.84, the latest version of this project at the moment, `dist build` command) - the results are below. I show only binary size changes since it's easier to measure them compared to performance differences in this app. * Current Dist profile (ThinLTO only): 1.7 Mib, clean build time: 5.5s * Dist + Thin LTO + `codegen-units = 1`: 1.5 Mib, clean build time: 7s * Dist + Fat LTO + `codegen-units = 1`: 1.4 Mib, clean build time: 11s Thank you.