Sunday 22 November 2026 Archive edition · go to today's edition NL EN FR
← Tech · Programming languages
Tech · Programming languagesRust

The Rust compiler now checks code on several threads at once, for the time being only in the nightly version

Type checking and borrow checking now run in parallel, letting a single crate be checked up to almost three times faster.

· latest source update ma · 2 sources · Rust Blog, FOSS Linux · Compiled with AI
Illustration for this article

The Rust compiler team has switched on the compiler's parallel frontend by default in the nightly version, starting with the build of 14 November. Jakub Beránek announced this on Monday on behalf of the team on the official Rust blog. The frontend is the part of rustc that checks, among other things, types and memory ownership. Code generation through LLVM already ran on multiple threads. The stable Rust release will for now keep handling the frontend one task after another.

Nightly uses two threads for the frontend by default, a cautious choice to limit memory use. The gains vary widely by project. When building a single crate from scratch, the average wait with eight threads fell by about 44 percent for cargo check and by 28 percent for an optimised build. For crates such as nalgebra, cargo and diesel, cargo check ran almost three times as fast with eight threads. For a full project the gain is smaller: checking the cargo crate on an eight-core machine dropped from 36.7 to 30.8 seconds. Incremental builds became only 3 to 5 percent faster on average.

FOSS Linux points out that the capability had been available as an option in nightly for about three years and that an earlier plan to stabilise it in 2024 was not met. The number of threads can be set with the unstable --jobs-frontend option, but above eight threads it adds little according to the team, while memory use goes up. Anyone wanting to return to the old behaviour sets the value to 1.

There are still known issues: compiler messages can appear in a varying order and some binaries are not exactly reproducible. The team treats these as bugs and asks users who opt out to report why. After a few months of monitoring it wants to stabilise the feature, though no specific version has been set.

Spotted a mistake in this article? Let us know.