From 03e68e34e5204cf39a35ac4ffd99820fcef2bb64 Mon Sep 17 00:00:00 2001 From: "Sparrow Li (LiYuan)" Date: Tue, 10 Feb 2026 09:11:10 +0800 Subject: [PATCH 1/7] Create parallel-front-end.md Add the parallel front end goal --- src/2026/parallel-front-end.md | 69 ++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 src/2026/parallel-front-end.md diff --git a/src/2026/parallel-front-end.md b/src/2026/parallel-front-end.md new file mode 100644 index 00000000..f1127ecf --- /dev/null +++ b/src/2026/parallel-front-end.md @@ -0,0 +1,69 @@ +# Promoting Parallel Front End + +| Metadata | | +| :--------------- | ---------------------------------------- | +| Point of contact | @SparrowLii | +| Status | Proposed | +| Tracking issue | [rust-lang/rust-project-goals#121] | +| See also | [rust-lang/rust#113349] | +| Zulip channel | [#t-compiler/wg-parallel-rustc][channel] | + +## Summary + +Continue with stabilization and performance improvements to the parallel front-end, continuing from the [2025h2 goal](https://rust-lang.github.io/rust-project-goals/2025h2/parallel-front-end.html). + +## Motivation + +Verify and resolve the few remaining issues(especially related to incremental compilation), stabilize the feature, and try to further improve parallel compilation performance through various means. + +### The status quo + +The parallel front-end has progressed well over the past year. We resolved [deadlock] issues and several [ICEs][ICE], added the `rustc-rayon` dependency for the parallel front-end to the rustc working tree, and enabled the parallel front-end in bootstrap. Thanks to everyone for their efforts! + +There are still some issues when the parallel front-end and incremental compilation work together. The most pressing issue we need to address is race conditions of incremental compilation. We have opened related PRs but we still need to spend time to figure out them. + +The inconstancy of query cycle errors between parallel and serial compilers is another point we should pay attention to. + +Furthermore, we do not yet have robust [testing] mechanisms to guarantee correctness and consistence of the parallel front-end. we'll therefore dedicate focused effort toward on a new test suite for parallel front-end. + +In addition, we need to document and enhance the support of surrounding tools for the parallel frontend, such as rustc-perf and Cargo. + +After that, we will start the feature stabilization process to push parallel front end into the stable release channel. + +Performance improvement would be long-term work. We are considering potential measures to speed up the parallel front-end, such as reducing data contention, adopting finer-grained parallelism, and enabling parallel macro expansion. + +### What we propose to do about it + +- Resolve remaining issues in the issue [list][open issues], especially [the major issue][big issue] related to incremental compilation. +- Build a parallel front end test suite to ensure the robustness and prevent regressions +- Enable the parallel front end in Cargo. +- Add more benchmarks for the parallel front end to rustc-perf +- Write a feature stabilization report and submit it for compiler FCP +- Continue improving parallel compilation performance, by parallelizing macro expansion and reducing data contention. + + +### Work items over the next year + +| Task | Owner(s) or team(s) | Notes | +| ---------------------------- | -------------------- | ----- | +| Implementation | @SparrowLii | | +| Author tests | @SparrowLii | | +| Discussion and moral support | ![Team][] [compiler] | | + + +## Team asks + +| Team | Support level | Notes | +| ---------- | ------------- | ----- | +| [cargo] | | | +| [compiler] | | | + +## Frequently asked questions + + +[channel]: https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fwg-parallel-rustc/ +[ICE]: https://github.com/rust-lang/rust/issues?q=label%3AA-parallel-compiler+ice +[deadlock]: https://github.com/rust-lang/rust/issues?q=label%3AA-parallel-compiler+deadlock +[testing]: https://github.com/rust-lang/rust/issues/118698 +[open issues]: https://github.com/rust-lang/rust/issues?q=state%3Aopen%20label%3AA-parallel-compiler +[big issue]: https://github.com/rust-lang/rust/issues/141540 From 24638361b0c1a5b28797e2184897fc022106ac13 Mon Sep 17 00:00:00 2001 From: "Sparrow Li (LiYuan)" Date: Tue, 10 Feb 2026 09:20:28 +0800 Subject: [PATCH 2/7] Add Team Asks --- src/2026/parallel-front-end.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/2026/parallel-front-end.md b/src/2026/parallel-front-end.md index f1127ecf..3fd2a2cb 100644 --- a/src/2026/parallel-front-end.md +++ b/src/2026/parallel-front-end.md @@ -55,8 +55,8 @@ Performance improvement would be long-term work. We are considering potential me | Team | Support level | Notes | | ---------- | ------------- | ----- | -| [cargo] | | | -| [compiler] | | | +| [wg-parallel-rustc] | Large | Discussion and Implementation | +| [compiler] | Small | Code Reviews | ## Frequently asked questions From e46a52e9f11077a5d079481e07febf327e3f8342 Mon Sep 17 00:00:00 2001 From: "Sparrow Li (LiYuan)" Date: Tue, 10 Feb 2026 09:31:37 +0800 Subject: [PATCH 3/7] Update Work items --- src/2026/parallel-front-end.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/2026/parallel-front-end.md b/src/2026/parallel-front-end.md index 3fd2a2cb..7eecc856 100644 --- a/src/2026/parallel-front-end.md +++ b/src/2026/parallel-front-end.md @@ -46,10 +46,11 @@ Performance improvement would be long-term work. We are considering potential me | Task | Owner(s) or team(s) | Notes | | ---------------------------- | -------------------- | ----- | -| Implementation | @SparrowLii | | -| Author tests | @SparrowLii | | -| Discussion and moral support | ![Team][] [compiler] | | - +| Issue Resolving | @wg-parallel-rustc | | +| Building the test suit | @ywxt | | +| Tools supporting | @ywxt | | +| Stabilization report | @SparrowLii | | +| Discussion and moral support | @wg-parallel-rustc | | ## Team asks @@ -60,7 +61,6 @@ Performance improvement would be long-term work. We are considering potential me ## Frequently asked questions - [channel]: https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fwg-parallel-rustc/ [ICE]: https://github.com/rust-lang/rust/issues?q=label%3AA-parallel-compiler+ice [deadlock]: https://github.com/rust-lang/rust/issues?q=label%3AA-parallel-compiler+deadlock From 8c9e54429ed8b8ec33de3c81e7d017d68ce0d8e4 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 12 Feb 2026 10:47:05 -0500 Subject: [PATCH 4/7] Apply suggestion from @petrochenkov Co-authored-by: Vadim Petrochenkov --- src/2026/parallel-front-end.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/2026/parallel-front-end.md b/src/2026/parallel-front-end.md index 7eecc856..006519f5 100644 --- a/src/2026/parallel-front-end.md +++ b/src/2026/parallel-front-end.md @@ -30,7 +30,7 @@ In addition, we need to document and enhance the support of surrounding tools fo After that, we will start the feature stabilization process to push parallel front end into the stable release channel. -Performance improvement would be long-term work. We are considering potential measures to speed up the parallel front-end, such as reducing data contention, adopting finer-grained parallelism, and enabling parallel macro expansion. +Performance improvement would be long-term work. We are considering potential measures to speed up the parallel front-end, such as reducing data contention, adopting finer-grained parallelism, and enabling parallel name resolution and macro expansion. ### What we propose to do about it From 200a5f2585872fc4e9f69379b4dcb8fa2bcd0506 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 12 Feb 2026 10:47:15 -0500 Subject: [PATCH 5/7] Apply suggestions from code review Co-authored-by: Vadim Petrochenkov --- src/2026/parallel-front-end.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/2026/parallel-front-end.md b/src/2026/parallel-front-end.md index 006519f5..dc66b3ed 100644 --- a/src/2026/parallel-front-end.md +++ b/src/2026/parallel-front-end.md @@ -39,7 +39,7 @@ Performance improvement would be long-term work. We are considering potential me - Enable the parallel front end in Cargo. - Add more benchmarks for the parallel front end to rustc-perf - Write a feature stabilization report and submit it for compiler FCP -- Continue improving parallel compilation performance, by parallelizing macro expansion and reducing data contention. +- Continue improving parallel compilation performance, by parallelizing more parts of the compiler, like name resolution and macro expansion, and reducing data contention. ### Work items over the next year @@ -62,7 +62,7 @@ Performance improvement would be long-term work. We are considering potential me ## Frequently asked questions [channel]: https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fwg-parallel-rustc/ -[ICE]: https://github.com/rust-lang/rust/issues?q=label%3AA-parallel-compiler+ice +[ICE]: https://github.com/rust-lang/rust/issues?q=label%3AA-parallel-compiler%20label%3AI-ICE [deadlock]: https://github.com/rust-lang/rust/issues?q=label%3AA-parallel-compiler+deadlock [testing]: https://github.com/rust-lang/rust/issues/118698 [open issues]: https://github.com/rust-lang/rust/issues?q=state%3Aopen%20label%3AA-parallel-compiler From 1514f8bda59d33719e886005788f6cfc20c86046 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 13 Feb 2026 10:23:20 -0500 Subject: [PATCH 6/7] Apply suggestion from @nikomatsakis --- src/2026/parallel-front-end.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/2026/parallel-front-end.md b/src/2026/parallel-front-end.md index dc66b3ed..a59911f0 100644 --- a/src/2026/parallel-front-end.md +++ b/src/2026/parallel-front-end.md @@ -20,7 +20,7 @@ Verify and resolve the few remaining issues(especially related to incremental co The parallel front-end has progressed well over the past year. We resolved [deadlock] issues and several [ICEs][ICE], added the `rustc-rayon` dependency for the parallel front-end to the rustc working tree, and enabled the parallel front-end in bootstrap. Thanks to everyone for their efforts! -There are still some issues when the parallel front-end and incremental compilation work together. The most pressing issue we need to address is race conditions of incremental compilation. We have opened related PRs but we still need to spend time to figure out them. +We recently fixed (in rust-lang/rust#151509) a major issue related to race conditions when incremental compilation executed in parallel.them. The inconstancy of query cycle errors between parallel and serial compilers is another point we should pay attention to. From cb5ed4df65af6abb6488b1648b3baa4893f76e68 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 13 Feb 2026 10:23:39 -0500 Subject: [PATCH 7/7] Apply suggestion from @nikomatsakis --- src/2026/parallel-front-end.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/2026/parallel-front-end.md b/src/2026/parallel-front-end.md index a59911f0..8542b62f 100644 --- a/src/2026/parallel-front-end.md +++ b/src/2026/parallel-front-end.md @@ -34,7 +34,7 @@ Performance improvement would be long-term work. We are considering potential me ### What we propose to do about it -- Resolve remaining issues in the issue [list][open issues], especially [the major issue][big issue] related to incremental compilation. +- Resolve remaining issues in the issue [list][open issues]. - Build a parallel front end test suite to ensure the robustness and prevent regressions - Enable the parallel front end in Cargo. - Add more benchmarks for the parallel front end to rustc-perf