{"article":{"slug":"enabling-the-parallel-frontend-on-nightly","title":"Enabling the parallel frontend on nightly","subtitle":null,"summary":"The Rust compiler team is enabling the parallel compiler frontend by default on nightly to surface remaining bugs before stabilization, and explains the context, expected speedups and how to report issues.","content_type":"announcement","language":"en","canonical_url":"https://blog.rust-lang.org/2026/11/16/enabling-parallel-frontend-on-nightly/","author":{"name":"Jakub Beránek, on behalf of the Compiler Team","url":null,"person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Rust Blog","url":"https://blog.rust-lang.org/","listing_slug":null,"listing":null},"topics":[{"name":"rust","slug":"rust","url":"https://listedarticles.com/topics/rust"},{"name":"compilers","slug":"compilers","url":"https://listedarticles.com/topics/compilers"},{"name":"programming-languages","slug":"programming-languages","url":"https://listedarticles.com/topics/programming-languages"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":1300,"reading_minutes":6,"published_at":"2026-11-16T00:00:00.000Z","added_at":"2026-11-16T16:53:46.173Z","updated_at":"2026-11-16T16:53:46.173Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/enabling-the-parallel-frontend-on-nightly","markdown_url":"https://listedarticles.com/articles/enabling-the-parallel-frontend-on-nightly.md","example":false,"citation":"Jakub Beránek, on behalf of the Compiler Team, Rust Blog. \"Enabling the parallel frontend on nightly.\" 16 Nov 2026. https://blog.rust-lang.org/2026/11/16/enabling-parallel-frontend-on-nightly/ (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://blog.rust-lang.org/2026/11/16/enabling-parallel-frontend-on-nightly/"},"body_markdown":"# Enabling the parallel frontend on nightly\n\n*Nov. 16, 2026 · Jakub Beránek on behalf of the Compiler Team*\n\nTL;DR: We are enabling the parallel frontend of the Rust compiler on nightly by default,\nto find remaining issues in preparation for its stabilization.\n\n## Context\n\nThe Rust compiler has been using multiple threads to compile code in its \"backend\" part (using LLVM) for a long time. However, its \"frontend\" part (which includes type checking and borrow checking) has been executing sequentially, on a single thread, which of course limits the performance of the compiler. If you are interested in a more in-depth explanation of parallelism in the Rust compiler, see this [previous post](https://blog.rust-lang.org/2023/11/09/parallel-rustc/#existing-intraprocess-parallelism-the-back-end).\n\nThe compiler frontend actually had support for running in parallel for a long time, but it was not enabled by default due to various issues. [Three years ago](https://blog.rust-lang.org/2023/11/09/parallel-rustc/), we made it possible to opt into the parallel frontend on the nightly channel, with the plan to stabilize it in 2024. Clearly, we did not achieve that goal, but work on the parallel frontend was still slowly progressing in the meantime.\n\nLast year, [Vadim Petrochenkov](https://github.com/petrochenkov), together with several other contributors, started a coordinated effort to finally get the parallel frontend over the finish line. Since then, many long-standing issues were fixed, and its performance was improved. Now we are at a point where we would like to make it widely available. But before that, we want to find out if people encounter issues with it in the wild, which is why we are enabling it by default only on the nightly channel. Once we will be confident enough that it is working well, we want to stabilize it.\n\nThe parallel frontend has been enabled on the nightly channel by default since `nightly-2026-11-14`.\n\n## Benefits\n\nThe primary benefit of enabling the parallel frontend is, of course, faster compilation of Rust programs.\n\nWe benchmarked the parallel frontend in our [benchmark suite](https://github.com/rust-lang/rustc-perf), which measures the duration to compile the *leaf* crate in a crate graph. As usual, the results were varied. In some benchmarks, the parallel frontend barely helped. In others, for example when performing a `cargo check` of the `nalgebra`, `cargo` or `diesel` crates, the compilation was almost three times faster, using 8 threads.\n\nIn the table below, you can find the aggregated wall-time mean change for the real-world benchmarks in our suite, when building a single crate from scratch across several configurations, compared to the same build using a sequential frontend.\n\n| Frontend threads / Profile | `check` | `clippy` | `debug` | `opt` |\n| --- | --- | --- | --- | --- |\n| 2 | -21.95 % | -20.74 % | -14.2 % | -12.51 % |\n| 4 | -37.99 % | -36.01 % | -29.14 % | -23.67 % |\n| 8 | -44.23 % | -41.76 % | -36.1 % | -27.88 % |\n\nIt is clear that the parallelization is not perfect, and we definitely plan to invest more effort into improving its performance. Nevertheless, with 8 threads, it can make the end-to-end compilation time of `cargo check` ~2x faster for several crates that we tested, which is still quite an improvement.\n\nThe performance benefits for incremental rebuilds are much more modest, and also very hard to compare, because the performance of rebuilds depends on what was changed and how were the codegen units laid out. In our benchmark suite, we saw a mean improvement of 3-5% for incremental rebuilds. But we currently do not have great benchmarks for this use-case, so your results might vary.\n\nWe can also zoom in on an individual crate. Here is a chart of how the wall-time scales when compiling the `nalgebra 0.33` crate, for a full non-incremental build (`full`), full incremental build (`incr-full`) and an incremental rebuild (`incr-patched`) across several build configurations:\n\n![Nalgebra benchmark results](https://blog.rust-lang.org/2026/11/16/enabling-parallel-frontend-on-nightly/nalgebra-0.33.png)\n\nWhat is interesting to note is that enabling the parallel frontend can actually also make the backend faster, for reasons explained [here](https://blog.rust-lang.org/2023/11/09/parallel-rustc/#new-intraprocess-parallelism-the-front-end).\n\nIt is important to note that all benchmark results presented above measured only the compilation of a single crate. When compiling a whole crate graph, your CPU cores might already be saturated because of backend (LLVM) parallelism or by Cargo compiling multiple crates in parallel. So the final performance effect will vary heavily based on the workload that you are running, and on the number of cores that you have available.\n\nWe also benchmarked `cargo check` end-to-end (checking the whole crate graph) on the `cargo` crate itself on a machine with 8 CPU cores. With 8 threads, it resulted in a ~15% end-to-end improvement:\n\n- 36.7s with 1 frontend thread\n- 35.1s with 2 frontend threads\n- 31.9s with 4 frontend threads\n- 30.8s with 8 frontend threads\n\nAs can be seen from the results above, when the CPU cores are already saturated with parallel crate compilation and LLVM, the positive effect of the parallel frontend is reduced.\n\n## Tuning the thread count\n\nAt the start, the nightly toolchain will default to the parallel frontend using only `2` threads. This is a conservative choice that should still allow us to find potential issues while not increasing memory usage a lot at the same time.\n\nIf you want to test out the performance with different thread counts, you can override the number of threads used for the frontend using the `--jobs-frontend` compiler flag. It can be specified either in the `RUSTFLAGS` environment variable, or you can put it into a [`.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html) file:\n\n```\n[build]\nrustflags = [\"-Zunstable-options\", \"--jobs-frontend=8\"]\n```\n\nCurrently, the performance of the parallel frontend will likely not scale very well above ~8 threads, but you can try it on your workload to test what happens. Note that using higher thread counts will likely lead to higher memory usage of the compiler, and in extreme cases it might cause you to run out of memory.\n\n## Limitations and known issues\n\nDue to the used parallelism, the produced order of diagnostics might not be deterministic when using the parallel frontend.\n\nIn some situations, the generated binary might also not be reproducible, though we currently consider these cases bugs, and we would like to identify them and fix them.\n\nThere are currently some [known issues](https://github.com/rust-lang/rust/issues?q=state%3Aopen%20label%3AA-reproducibility%20label%3AA-parallel-compiler) related to the reproducibility of the Rust compiler when using the parallel frontend, which are being worked on.\n\n## How do I opt out?\n\nTo reiterate: this is only being enabled on nightly for now. If you are using the stable toolchain, you will still be using the sequential frontend by default.\n\nIf you want to disable the parallel frontend on the nightly channel, pass `-Zunstable-options --jobs-frontend=1` to `rustc`, either via the `RUSTFLAGS` environment variable, or with the [`.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html) configuration file:\n\n```\n[build]\nrustflags = [\"-Zunstable-options\", \"--jobs-frontend=1\"]\n```\n\nIf you have to do this for some reason, please do tell us why [on GitHub](https://github.com/rust-lang/rust/issues/113349) or [on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/Parallel.20frontend.20issues/with/624551811). We would especially like to know about any compiler crashes that you encounter, or the produced binaries not being reproducible when the parallel frontend is enabled.\n\n## What's next?\n\nOver the next few months, we will be monitoring GitHub and Zulip for any reported issues about the parallel frontend. Once we have enough confidence that it is working well, and there are no major issues, we would like to move forward and finally stabilize it.\n\nWe would also like to improve its performance, and make more things parallel. So far, a lot of the work on the parallel frontend has been focused on making it work correctly, rather than tuning its performance down to the last percent. We thus expect that we might still be able to make further performance improvements to it.\n\nWe would also like to make more parts of the frontend actually parallel, as some parts are currently still sequential even if parallelism is enabled. There is some ongoing work on this. Last year, we had a Google Summer of Code project focused on enabling [parallel macro expansion and name resolution](https://blog.rust-lang.org/2025/11/18/gsoc-2025-results/#improving-the-rustc-parallel-frontend-parallel-macro-expansion), and there is also an open [pull request](https://github.com/rust-lang/rust/pull/163495) for parallelizing the lowering of the Abstract Syntax Tree (AST) to the High-Level Intermediate Representation (HIR). More work remains to be done on this front.\n","body_html":"<h1 id=\"enabling-the-parallel-frontend-on-nightly\">Enabling the parallel frontend on nightly</h1>\n<p><em>Nov. 16, 2026 · Jakub Beránek on behalf of the Compiler Team</em></p>\n<p>TL;DR: We are enabling the parallel frontend of the Rust compiler on nightly by default,\nto find remaining issues in preparation for its stabilization.</p>\n<h2 id=\"context\">Context</h2>\n<p>The Rust compiler has been using multiple threads to compile code in its &quot;backend&quot; part (using LLVM) for a long time. However, its &quot;frontend&quot; part (which includes type checking and borrow checking) has been executing sequentially, on a single thread, which of course limits the performance of the compiler. If you are interested in a more in-depth explanation of parallelism in the Rust compiler, see this <a href=\"https://blog.rust-lang.org/2023/11/09/parallel-rustc/#existing-intraprocess-parallelism-the-back-end\" rel=\"nofollow ugc noopener\">previous post</a>.</p>\n<p>The compiler frontend actually had support for running in parallel for a long time, but it was not enabled by default due to various issues. <a href=\"https://blog.rust-lang.org/2023/11/09/parallel-rustc/\" rel=\"nofollow ugc noopener\">Three years ago</a>, we made it possible to opt into the parallel frontend on the nightly channel, with the plan to stabilize it in 2024. Clearly, we did not achieve that goal, but work on the parallel frontend was still slowly progressing in the meantime.</p>\n<p>Last year, <a href=\"https://github.com/petrochenkov\" rel=\"nofollow ugc noopener\">Vadim Petrochenkov</a>, together with several other contributors, started a coordinated effort to finally get the parallel frontend over the finish line. Since then, many long-standing issues were fixed, and its performance was improved. Now we are at a point where we would like to make it widely available. But before that, we want to find out if people encounter issues with it in the wild, which is why we are enabling it by default only on the nightly channel. Once we will be confident enough that it is working well, we want to stabilize it.</p>\n<p>The parallel frontend has been enabled on the nightly channel by default since <code>nightly-2026-11-14</code>.</p>\n<h2 id=\"benefits\">Benefits</h2>\n<p>The primary benefit of enabling the parallel frontend is, of course, faster compilation of Rust programs.</p>\n<p>We benchmarked the parallel frontend in our <a href=\"https://github.com/rust-lang/rustc-perf\" rel=\"nofollow ugc noopener\">benchmark suite</a>, which measures the duration to compile the <em>leaf</em> crate in a crate graph. As usual, the results were varied. In some benchmarks, the parallel frontend barely helped. In others, for example when performing a <code>cargo check</code> of the <code>nalgebra</code>, <code>cargo</code> or <code>diesel</code> crates, the compilation was almost three times faster, using 8 threads.</p>\n<p>In the table below, you can find the aggregated wall-time mean change for the real-world benchmarks in our suite, when building a single crate from scratch across several configurations, compared to the same build using a sequential frontend.</p>\n<div class=\"table-wrap\"><table><thead><tr><th>Frontend threads / Profile</th><th><code>check</code></th><th><code>clippy</code></th><th><code>debug</code></th><th><code>opt</code></th></tr></thead><tbody><tr><td>2</td><td>-21.95 %</td><td>-20.74 %</td><td>-14.2 %</td><td>-12.51 %</td></tr><tr><td>4</td><td>-37.99 %</td><td>-36.01 %</td><td>-29.14 %</td><td>-23.67 %</td></tr><tr><td>8</td><td>-44.23 %</td><td>-41.76 %</td><td>-36.1 %</td><td>-27.88 %</td></tr></tbody></table></div>\n<p>It is clear that the parallelization is not perfect, and we definitely plan to invest more effort into improving its performance. Nevertheless, with 8 threads, it can make the end-to-end compilation time of <code>cargo check</code> ~2x faster for several crates that we tested, which is still quite an improvement.</p>\n<p>The performance benefits for incremental rebuilds are much more modest, and also very hard to compare, because the performance of rebuilds depends on what was changed and how were the codegen units laid out. In our benchmark suite, we saw a mean improvement of 3-5% for incremental rebuilds. But we currently do not have great benchmarks for this use-case, so your results might vary.</p>\n<p>We can also zoom in on an individual crate. Here is a chart of how the wall-time scales when compiling the <code>nalgebra 0.33</code> crate, for a full non-incremental build (<code>full</code>), full incremental build (<code>incr-full</code>) and an incremental rebuild (<code>incr-patched</code>) across several build configurations:</p>\n<figure><img src=\"https://blog.rust-lang.org/2026/11/16/enabling-parallel-frontend-on-nightly/nalgebra-0.33.png\" alt=\"Nalgebra benchmark results\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"no-referrer\" /></figure>\n<p>What is interesting to note is that enabling the parallel frontend can actually also make the backend faster, for reasons explained <a href=\"https://blog.rust-lang.org/2023/11/09/parallel-rustc/#new-intraprocess-parallelism-the-front-end\" rel=\"nofollow ugc noopener\">here</a>.</p>\n<p>It is important to note that all benchmark results presented above measured only the compilation of a single crate. When compiling a whole crate graph, your CPU cores might already be saturated because of backend (LLVM) parallelism or by Cargo compiling multiple crates in parallel. So the final performance effect will vary heavily based on the workload that you are running, and on the number of cores that you have available.</p>\n<p>We also benchmarked <code>cargo check</code> end-to-end (checking the whole crate graph) on the <code>cargo</code> crate itself on a machine with 8 CPU cores. With 8 threads, it resulted in a ~15% end-to-end improvement:</p>\n<ul><li>36.7s with 1 frontend thread</li><li>35.1s with 2 frontend threads</li><li>31.9s with 4 frontend threads</li><li>30.8s with 8 frontend threads</li></ul>\n<p>As can be seen from the results above, when the CPU cores are already saturated with parallel crate compilation and LLVM, the positive effect of the parallel frontend is reduced.</p>\n<h2 id=\"tuning-the-thread-count\">Tuning the thread count</h2>\n<p>At the start, the nightly toolchain will default to the parallel frontend using only <code>2</code> threads. This is a conservative choice that should still allow us to find potential issues while not increasing memory usage a lot at the same time.</p>\n<p>If you want to test out the performance with different thread counts, you can override the number of threads used for the frontend using the <code>--jobs-frontend</code> compiler flag. It can be specified either in the <code>RUSTFLAGS</code> environment variable, or you can put it into a <a href=\"https://doc.rust-lang.org/cargo/reference/config.html\" rel=\"nofollow ugc noopener\"><code>.cargo/config.toml</code></a> file:</p>\n<pre><code>[build]\nrustflags = [&quot;-Zunstable-options&quot;, &quot;--jobs-frontend=8&quot;]</code></pre>\n<p>Currently, the performance of the parallel frontend will likely not scale very well above ~8 threads, but you can try it on your workload to test what happens. Note that using higher thread counts will likely lead to higher memory usage of the compiler, and in extreme cases it might cause you to run out of memory.</p>\n<h2 id=\"limitations-and-known-issues\">Limitations and known issues</h2>\n<p>Due to the used parallelism, the produced order of diagnostics might not be deterministic when using the parallel frontend.</p>\n<p>In some situations, the generated binary might also not be reproducible, though we currently consider these cases bugs, and we would like to identify them and fix them.</p>\n<p>There are currently some <a href=\"https://github.com/rust-lang/rust/issues?q=state%3Aopen%20label%3AA-reproducibility%20label%3AA-parallel-compiler\" rel=\"nofollow ugc noopener\">known issues</a> related to the reproducibility of the Rust compiler when using the parallel frontend, which are being worked on.</p>\n<h2 id=\"how-do-i-opt-out\">How do I opt out?</h2>\n<p>To reiterate: this is only being enabled on nightly for now. If you are using the stable toolchain, you will still be using the sequential frontend by default.</p>\n<p>If you want to disable the parallel frontend on the nightly channel, pass <code>-Zunstable-options --jobs-frontend=1</code> to <code>rustc</code>, either via the <code>RUSTFLAGS</code> environment variable, or with the <a href=\"https://doc.rust-lang.org/cargo/reference/config.html\" rel=\"nofollow ugc noopener\"><code>.cargo/config.toml</code></a> configuration file:</p>\n<pre><code>[build]\nrustflags = [&quot;-Zunstable-options&quot;, &quot;--jobs-frontend=1&quot;]</code></pre>\n<p>If you have to do this for some reason, please do tell us why <a href=\"https://github.com/rust-lang/rust/issues/113349\" rel=\"nofollow ugc noopener\">on GitHub</a> or <a href=\"https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/Parallel.20frontend.20issues/with/624551811\" rel=\"nofollow ugc noopener\">on Zulip</a>. We would especially like to know about any compiler crashes that you encounter, or the produced binaries not being reproducible when the parallel frontend is enabled.</p>\n<h2 id=\"what-s-next\">What&#39;s next?</h2>\n<p>Over the next few months, we will be monitoring GitHub and Zulip for any reported issues about the parallel frontend. Once we have enough confidence that it is working well, and there are no major issues, we would like to move forward and finally stabilize it.</p>\n<p>We would also like to improve its performance, and make more things parallel. So far, a lot of the work on the parallel frontend has been focused on making it work correctly, rather than tuning its performance down to the last percent. We thus expect that we might still be able to make further performance improvements to it.</p>\n<p>We would also like to make more parts of the frontend actually parallel, as some parts are currently still sequential even if parallelism is enabled. There is some ongoing work on this. Last year, we had a Google Summer of Code project focused on enabling <a href=\"https://blog.rust-lang.org/2025/11/18/gsoc-2025-results/#improving-the-rustc-parallel-frontend-parallel-macro-expansion\" rel=\"nofollow ugc noopener\">parallel macro expansion and name resolution</a>, and there is also an open <a href=\"https://github.com/rust-lang/rust/pull/163495\" rel=\"nofollow ugc noopener\">pull request</a> for parallelizing the lowering of the Abstract Syntax Tree (AST) to the High-Level Intermediate Representation (HIR). More work remains to be done on this front.</p>","headings":[{"level":1,"text":"Enabling the parallel frontend on nightly","id":"enabling-the-parallel-frontend-on-nightly"},{"level":2,"text":"Context","id":"context"},{"level":2,"text":"Benefits","id":"benefits"},{"level":2,"text":"Tuning the thread count","id":"tuning-the-thread-count"},{"level":2,"text":"Limitations and known issues","id":"limitations-and-known-issues"},{"level":2,"text":"How do I opt out?","id":"how-do-i-opt-out"},{"level":2,"text":"What's next?","id":"what-s-next"}]}}