Skip to content

Commit 26b95f0

Browse files
committed
add doc for newly added modules to config
1 parent 4250ea3 commit 26b95f0

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

src/bootstrap/src/core/config/config.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
//! Serialized configuration of a build.
1+
//! This module defines the central `Config` struct, which aggregates all components
2+
//! of the bootstrap configuration into a single unit.
23
//!
3-
//! This module implements parsing `bootstrap.toml` configuration files to tweak
4-
//! how the build runs.
4+
//! It serves as the primary public interface for accessing bootstrap's configuration data.
5+
//! This module orchestrates the overall configuration parsing process by leveraging
6+
//! logic from `parsing.rs` and provides top-level methods for initializing (`Config::parse()`)
7+
//! and querying the comprehensive configuration state. It also contains various utility
8+
//! methods that operate on the overall configuration.
59
610
use std::cell::Cell;
711
use std::collections::{BTreeSet, HashMap, HashSet};

src/bootstrap/src/core/config/parsing.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
//! This module contains the core logic for parsing, validating, and inferring the
2+
//! final bootstrap `Config` from various raw inputs.
3+
//!
4+
//! It handles the intricate process of reading command-line arguments, environment variables,
5+
//! and `bootstrap.toml` files, merging them, applying defaults, and performing
6+
//! cross-component validations. The main `parse_inner` function and its related
7+
//! helper functions reside here, transforming the raw `Toml` data into the structured `Config` types
8+
19
use std::collections::{BTreeSet, HashMap};
210
use std::path::{Path, PathBuf, absolute};
311
use std::str::FromStr;

src/bootstrap/src/core/config/toml.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
//! This module defines the structures that directly mirror the `bootstrap.toml`
2+
//! file's format. These types are used for `serde` deserialization, serving as an
3+
//! intermediate representation that gets processed and merged into the final `Config`
4+
//! types from the `types` module.
5+
//!
6+
//! It also houses the `Merge` trait and `define_config!` macro, which are essential
7+
//! for handling these raw TOML structures.
8+
19
use serde::{Deserialize, Deserializer};
210
use serde_derive::Deserialize;
311

src/bootstrap/src/core/config/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! This module defines the core, processed, and operational structures that represent
2+
//! the final bootstrap configuration.
3+
14
use std::fmt::Display;
25
use std::path::PathBuf;
36
use std::str::FromStr;

0 commit comments

Comments
 (0)