Rollup merge of #160924 - mejrs:split_cstore, r=JonathanBrouwer split up `rustc_session` Followup on https://github.com/rust-lang/rust/pull/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" />
Website | Getting started | Learn | Documentation | Contributing
This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.
Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrated with other languages.
Reliability: Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.
Productivity: Comprehensive documentation, a compiler committed to providing great diagnostics, and advanced tooling including package manager and build tool (Cargo), auto-formatter (rustfmt), linter (Clippy) and editor support (rust-analyzer).
Read “Installation” from The Book.
If you really want to install from source (though this is not recommended), see INSTALL.md.
See https://www.rust-lang.org/community for a list of chat platforms and forums.
See CONTRIBUTING.md.
For a detailed explanation of the compiler's architecture and how to begin contributing, see the rustc-dev-guide.
Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the “Rust Trademarks”).
If you want to use these names or brands, please read the Rust language trademark policy.
Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.