I’m just wondering if it would be possible to compile several crates (that don’t depend on each other) simultaneously. I guess that this would speed up the first debug and release build a lot. However, I don’t know too much about how rustc/LLVM works.
Cargo already does this. If you watch the progress bar as it builds, the list to the right of the bar are the ones building parallel. You can also look in your system’s process monitor to see multiple
rustc at once.
Oh, I wasn’t aware of this. Sorry to waste your time.
rustc also divides large crates into smaller chunks and compiles these chunks in parallel, so it can use multiple CPU cores even when compiling a single crate. However, only certain phases of compilation can be parallelized in this way. Other phases are still largely single-threaded.