Skip to content

Commit a1b8de7

Browse files
SparrowLiinikomatsakislqd
authored
Add parallel front end goal in 25h2 (#330)
* Add parallel front end goal in 25h2 * fix statements for parallel front end * Update src/2025h2/parallel-front-end.md Co-authored-by: Rémy Rakic <[email protected]> --------- Co-authored-by: Niko Matsakis <[email protected]> Co-authored-by: Rémy Rakic <[email protected]>
1 parent 52d766a commit a1b8de7

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

src/2025h2/parallel-front-end.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Promoting Parallel Front End
2+
3+
| Metadata | |
4+
| :--------------- | ------------------------------------------------- |
5+
| Point of contact | @SparrowLii |
6+
| Teams | <!-- TEAMS WITH ASKS --> |
7+
| Task owners | <!-- TASK OWNERS --> |
8+
| Status | Proposed |
9+
| Tracking issue | [rust-lang/rust-project-goals#121] |
10+
| See also | [rust-lang/rust#113349] |
11+
| Zulip channel | [#t-compiler/wg-parallel-rustc][channel] |
12+
13+
[channel]: https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fwg-parallel-rustc/
14+
15+
16+
## Summary
17+
18+
Continue with stabilization and performance improvements to parallel front-end, continuing from the [2025h1 goal](https://rust-lang.github.io/rust-project-goals/2025h1/parallel-front-end.html).
19+
20+
## Motivation
21+
22+
Verify and resolve the few remaining deadlock and other issues, stabilize the feature, and try to further improve parallel compilation performance through various means.
23+
24+
### The status quo
25+
26+
Parallel front end progressed well in the first half of the year. We resolved the deadlock issue caused by the deadlock handler, added the rustc-rayon dependency of the parallel front end to the rustc working tree, and changed the work-stealing scheduling algorithm to avoid deadlocks in parallel execution of rustc queries.
27+
28+
Next we need to resolve and verify the remaining issue list, improve the parallel front end test suite, and include all known issues into the ui tests to ensure stability of the feature.
29+
30+
Then we will start the feature stabilization process to push parallel front end into the stable version.
31+
32+
In addition, there are already contributors working on improving the performance of the parallel front end, such as trying to parallelize the macro expansion process, analysing data contention in query calls, etc. (thank you very much). We will conduct more detailed analysis and implementation of these directions in the second half of the year.
33+
34+
In addition, we need to document and enhance the support of surrounding tools for the parallel frontend, such as bootstrap, rustc-perf, and Cargo.
35+
36+
### The next 6 months
37+
38+
- Resolve the remaining issues in the issue [list](https://github.com/rust-lang/rust/issues?q=state%3Aopen%20label%3AA-parallel-compiler). Most of them have been solved, but are missing tests ensuring that the code won't regress again.
39+
- Land the parallel front end [test suite](https://github.com/rust-lang/rust/pull/132051) to ensure the robustness and prevent various issues from occurring again.
40+
- Enable parallel front end in bootstrap.
41+
- Continue to improve parallel compilation performance, by parallelizing macro expansion and reducing data contention.
42+
- Enable parallel front end in Cargo.
43+
- Add more benchmarks for the parallel front end to rustc-perf
44+
- Write stabilization report for the feature and submit it for compiler FCP
45+
46+
### The "shiny future" we are working towards
47+
48+
We will ensure robustness of the parallel front end and push it to stabilization.
49+
50+
The current parallelization front end can already reduce the overall compilation time by 20~30+ percent, but we will continue to optimize it so that this number continues to grow.
51+
52+
## Design axioms
53+
54+
The parallel front end should be:
55+
- safe: Ensure the safe and correct execution of the compilation process
56+
- consistent: The compilation result should be consistent with that in single thread by default
57+
- maintainable: The implementation should be easy to maintain and extend, and not cause confusion to developers who are not familiar with it.
58+
59+
[da]: ../about/design_axioms.md
60+
61+
## Ownership and team asks
62+
63+
**Owner:** @SparrowLii and Parallel Rustc WG own this goal
64+
65+
| Task | Owner(s) or team(s) | Notes |
66+
| ---------------------------- | -------------------- | ----- |
67+
| Implementation | @SparrowLii | |
68+
| Author tests | @SparrowLii | |
69+
| Discussion and moral support | ![Team][] [compiler] | |
70+
71+
## Frequently asked questions
72+
73+
74+
[ICE]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AWG-compiler-parallel+ice
75+
[deadlock]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AWG-compiler-parallel+deadlock
76+
[test]: https://github.com/rust-lang/rust/issues/118698
77+
[issues]: https://github.com/rust-lang/rust/labels/WG-compiler-parallel

0 commit comments

Comments
 (0)