Dev News Daily ENDE

Rust turns on the parallel compiler frontend by default on nightly, starting with two threads

The Rust compiler's frontend - the part that does type checking and borrow checking - has run on a single thread, while the LLVM backend has long used several. On 16 November Jakub Beránek wrote on the Rust blog, on behalf of the compiler team, that the parallel frontend has been enabled by default on the nightly channel since nightly-2026-11-14. The aim is to find remaining problems before stabilising it; the stable toolchain keeps the sequential frontend.

Opt-in on nightly has existed for three years, with a plan to stabilise in 2024 that was missed. Last year Vadim Petrochenkov and other contributors began a coordinated effort that fixed many long-standing issues and improved performance.

In the project's benchmark suite, which times the compilation of one leaf crate, results varied. For some crates the parallel frontend barely helped; for cargo check of nalgebra, cargo or diesel, eight threads made it almost three times faster. Across real-world benchmarks the mean wall-time change with eight threads was -44.23% for check, -41.76% for clippy, -36.1% for debug and -27.88% for opt builds; with two threads it was about -21% for check. Incremental rebuilds gained 3-5% on average. A whole crate graph is a different case, because Cargo and LLVM may already keep the cores busy: cargo check of the cargo crate on an eight-core machine went from 36.7 seconds with one frontend thread to 30.8 seconds with eight, about 15%.

Nightly starts with two frontend threads to limit extra memory use. The count can be set with -Zunstable-options --jobs-frontend=N in RUSTFLAGS or .cargo/config.toml, and --jobs-frontend=1 turns parallelism off. The post says scaling above about eight threads is likely poor and that higher counts raise memory use, in extreme cases to the point of running out. Diagnostics may appear in a non-deterministic order, and some builds may not be reproducible; the team treats those as bugs and asks for reports.

Rust turns on the parallel compiler frontend by default on nightly, starting with two threads
Rust turns on the parallel compiler frontend by default on nightly, starting with two threads — Dev News Daily

Why it matters

The published numbers separate two situations that are easy to confuse: one crate compiled on idle cores, where the gain is large, and a full build, where the cores are already busy and the gain is closer to 15%. Users on nightly now test the change by default, and the ordering and reproducibility issues are the things the team asks them to report.