Commit d00435f
committed
Auto merge of rust-lang#141272 - Shourya742:2025-05-18-modularize-config-module, r=Kobzol
modularize the config module bootstrap
Currently, our `config` module is quite large over 3,000 lines, and handles a wide range of responsibilities. This PR aims to break it down into smaller, more focused submodules to improve readability and maintainability:
* **`toml`**: Introduces a dedicated `toml` submodule within the `config` module. Its sole purpose is to define configuration-related structs along with their corresponding deserialization logic. It also contains the `parse_inner` method, which serves as the central function for extracting relevant information from the TOML structs and constructing the final configuration.
* **`rust`, `dist`, `install`, `llvm`, `build`, `gcc`, and others**: Each of these modules contains TOML subsections specific to their domain, along with the logic necessary to convert them into parts of the final configuration struct.
* **`config/mod.rs`**: Contains shared types and enums used across multiple TOML subsections.
* **`config/config.rs`**: Houses the logic that integrates all the TOML subsections into the complete configuration struct.
r? `@kobzol`File tree
15 files changed
+2238
-1996
lines changed- src/bootstrap/src/core
- config
- toml
15 files changed
+2238
-1996
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments