I am trying to dig up some information about Cargo.toml
codegen-units
. I see the feature referenced as far back as 2014: Default settings for parallel codegen - Rust Internals
If anyone with background in this area can answer any of these questions, I'd really appreciate:
- What is the minimum Rust needed to pass
codegen-units
in aCargo.toml
? -
When was theI thought I remembered reading about this in a blog, but can't find it. This reduces the full amount of optimizations that can be used (e.g. codegen-units + ThinLTO is not as good as codegen-units = 1 · Issue #47745 · rust-lang/rust · GitHub) and I'm trying to bring this information together into acodegen-units
set to16
for release profiles?min-sized-rust
repo that shows how to minimize Rust binary size.
Edit: Found that Rust 1.24.0 set the default to 16: https://github.com/rust-lang/rust/blob/master/RELEASES.md#compiler-7