Uh oh!
There was an error while loading. Please reload this page.
split up rustc_session - #160924
Conversation
rustbot
commented
Aug 11, 2026
This PR changes rustc_public cc @oli-obk, @celinval, @ouz-a, @makai410 These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
rustbot
commented
Aug 11, 2026
r? @mu001999 rustbot has assigned @mu001999. Use Why was this reviewer chosen?The reviewer was selected based on:
|
JonathanBrouwer
commented
Aug 11, 2026
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
JonathanBrouwer
commented
Aug 11, 2026
Happy to review this, should have time |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
rust-timer
commented
Aug 11, 2026
Finished benchmarking commit (3dcaed8): comparison URL. Overall result: no relevant changes - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (secondary 0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 463.191s -> 456.228s (-1.50%) |
JonathanBrouwer
commented
Aug 11, 2026
Code changes look good, and intuitively this also looks like an improvement but it's always good to test, so: I did some perf testing locally on this PR, it would be nice if rust-timer had multi-threaded bootstrap benchmarks but that's sadly not the world we live in. Running Script that I ran was (not proud of this one) foriin$(seq 1 10);do rm -r build/x86_64-unknown-linux-gnu/stage1-rustc/;time ./x -q check compiler/rustc_middle;done@bors r+ rollup |
split up `rustc_session` Followup on rust-lang#160336 cc @JonathanBrouwer (feel free to review if you want) The first commit splits out the `cstore` module from `rustc_session` into its own crate. `rustc_session` actually never used it anywhere internally, and there are also several crates that only depend on `rustc_session` for it. So it is a natural candidate to split off. The second commit is similar; `rustc_hir::definitions` is moved to `rustc_hir_id`; it is used nowhere in `rustc_hir`, except to implement an inherent method: ```rust impl DefKind { pub fn def_path_data(self, name: Option<Symbol>) -> DefPathData { } } ``` which is used (once) in rustc_middle, so the items in `rustc_hir::definitions` and this conversion function could be in many places. `rustc_hir_id` is the earliest and the easiest, so that's what I went with. Together these allow `rustc_crate_store`, `rustc_hir` and `rustc_session` to compile in parallel. Current graph: <img width="825" height="617" alt="image" src="https://github.com/user-attachments/assets/aa954265-0057-4596-a7c4-38290937fb74" /> Graph after this pr: <img width="853" height="572" alt="image" src="https://github.com/user-attachments/assets/9bcd16f8-897c-4990-920b-249500b2e78e" />
split up `rustc_session` Followup on rust-lang#160336 cc @JonathanBrouwer (feel free to review if you want) The first commit splits out the `cstore` module from `rustc_session` into its own crate. `rustc_session` actually never used it anywhere internally, and there are also several crates that only depend on `rustc_session` for it. So it is a natural candidate to split off. The second commit is similar; `rustc_hir::definitions` is moved to `rustc_hir_id`; it is used nowhere in `rustc_hir`, except to implement an inherent method: ```rust impl DefKind { pub fn def_path_data(self, name: Option<Symbol>) -> DefPathData { } } ``` which is used (once) in rustc_middle, so the items in `rustc_hir::definitions` and this conversion function could be in many places. `rustc_hir_id` is the earliest and the easiest, so that's what I went with. Together these allow `rustc_crate_store`, `rustc_hir` and `rustc_session` to compile in parallel. Current graph: <img width="825" height="617" alt="image" src="https://github.com/user-attachments/assets/aa954265-0057-4596-a7c4-38290937fb74" /> Graph after this pr: <img width="853" height="572" alt="image" src="https://github.com/user-attachments/assets/9bcd16f8-897c-4990-920b-249500b2e78e" />
…uwer Rollup of 14 pull requests Successful merges: - #160620 (Do not pass `-no-pie` on Windows) - #160731 (Arc: Remove unnecessary fmt::Display use for overflow assertion) - #160760 (Miri: give the incremental session a chance to finish) - #160854 (Add -Zwasm-proc-macros flag) - #160868 (std: Adjust cfgs again for TLS on WASI) - #160894 (Allow running an arbitrary number of try jobs per PR) - #160790 (rustc-book: update sys-v abi link) - #160878 (Add rust_analyzer to check-cfg names) - #160909 (tests/run-make-cargo/thumb-none-cortex-m: bump `cortex-m` dependency) - #160920 (No longer mention the removed generic) - #160921 (rustdoc: Fix invalid CSS classes generated for notable items) - #160924 (split up `rustc_session`) - #160934 (Ensure TLS accesses don't call the global allocator through panic) - #160937 (Store the names of `Fn` trait parameters in the AST, fix rustfmt bug)
Rollup of 14 pull requests Successful merges: - #160620 (Do not pass `-no-pie` on Windows) - #160731 (Arc: Remove unnecessary fmt::Display use for overflow assertion) - #160854 (Add -Zwasm-proc-macros flag) - #160868 (std: Adjust cfgs again for TLS on WASI) - #160882 (Add basic `splat` support to `rustdoc`) - #160894 (Allow running an arbitrary number of try jobs per PR) - #160790 (rustc-book: update sys-v abi link) - #160878 (Add rust_analyzer to check-cfg names) - #160909 (tests/run-make-cargo/thumb-none-cortex-m: bump `cortex-m` dependency) - #160920 (No longer mention the removed generic) - #160921 (rustdoc: Fix invalid CSS classes generated for notable items) - #160924 (split up `rustc_session`) - #160934 (Ensure TLS accesses don't call the global allocator through panic) - #160937 (Store the names of `Fn` trait parameters in the AST, fix rustfmt bug)
Uh oh!
There was an error while loading. Please reload this page.
Rollup merge of #160924 - mejrs:split_cstore, r=JonathanBrouwer split up `rustc_session` Followup on #160336 cc @JonathanBrouwer (feel free to review if you want) The first commit splits out the `cstore` module from `rustc_session` into its own crate. `rustc_session` actually never used it anywhere internally, and there are also several crates that only depend on `rustc_session` for it. So it is a natural candidate to split off. The second commit is similar; `rustc_hir::definitions` is moved to `rustc_hir_id`; it is used nowhere in `rustc_hir`, except to implement an inherent method: ```rust impl DefKind { pub fn def_path_data(self, name: Option<Symbol>) -> DefPathData { } } ``` which is used (once) in rustc_middle, so the items in `rustc_hir::definitions` and this conversion function could be in many places. `rustc_hir_id` is the earliest and the easiest, so that's what I went with. Together these allow `rustc_crate_store`, `rustc_hir` and `rustc_session` to compile in parallel. Current graph: <img width="825" height="617" alt="image" src="https://github.com/user-attachments/assets/aa954265-0057-4596-a7c4-38290937fb74" /> Graph after this pr: <img width="853" height="572" alt="image" src="https://github.com/user-attachments/assets/9bcd16f8-897c-4990-920b-249500b2e78e" />
Rollup of 14 pull requests Successful merges: - rust-lang/rust#160620 (Do not pass `-no-pie` on Windows) - rust-lang/rust#160731 (Arc: Remove unnecessary fmt::Display use for overflow assertion) - rust-lang/rust#160854 (Add -Zwasm-proc-macros flag) - rust-lang/rust#160868 (std: Adjust cfgs again for TLS on WASI) - rust-lang/rust#160882 (Add basic `splat` support to `rustdoc`) - rust-lang/rust#160894 (Allow running an arbitrary number of try jobs per PR) - rust-lang/rust#160790 (rustc-book: update sys-v abi link) - rust-lang/rust#160878 (Add rust_analyzer to check-cfg names) - rust-lang/rust#160909 (tests/run-make-cargo/thumb-none-cortex-m: bump `cortex-m` dependency) - rust-lang/rust#160920 (No longer mention the removed generic) - rust-lang/rust#160921 (rustdoc: Fix invalid CSS classes generated for notable items) - rust-lang/rust#160924 (split up `rustc_session`) - rust-lang/rust#160934 (Ensure TLS accesses don't call the global allocator through panic) - rust-lang/rust#160937 (Store the names of `Fn` trait parameters in the AST, fix rustfmt bug)
Followup on #160336 cc @JonathanBrouwer (feel free to review if you want)
The first commit splits out the
cstoremodule fromrustc_sessioninto its own crate.rustc_sessionactually never used it anywhere internally, and there are also several crates that only depend onrustc_sessionfor it. So it is a natural candidate to split off.The second commit is similar;
rustc_hir::definitionsis moved torustc_hir_id; it is used nowhere inrustc_hir, except to implement an inherent method:which is used (once) in rustc_middle, so the items in
rustc_hir::definitionsand this conversion function could be in many places.rustc_hir_idis the earliest and the easiest, so that's what I went with.Together these allow
rustc_crate_store,rustc_hirandrustc_sessionto compile in parallel.Current graph:
Graph after this pr: