> Today, Rust compilation is parallel in the front-end at the crate level, not file or even module level. Large crates will therefore not benefit from parallelism,
Sort of, it's managed at the crate level and not file or module indeed, but the compiler then splits crates into smaller chunks called “codegen units”.
See: https://doc.rust-lang.org/rustc/codegen-options/index.html#c...
> This flag controls the maximum number of code generation units the crate is split into. […] When a crate is split into multiple codegen units, LLVM is able to process them in parallel. […]
The default value is 16 for non-incremental builds. For incremental builds the default is 256 which allows caching to be more granular.