Skip to main content

aube_settings/
lib.rs

1//! Centralized registry of aube's CLI/config settings.
2//!
3//! Every setting aube honors lives in the workspace-root
4//! `settings.toml`: its name, type, default, implementation status,
5//! and the source surfaces (CLI flag, env var, `.npmrc`,
6//! `pnpm-workspace.yaml`) that can populate it. `build.rs` turns
7//! that TOML file into two generated artifacts:
8//!
9//! - [`meta::SETTINGS`] — a `&'static [SettingMeta]` slice so other
10//!   crates can introspect the full settings surface (for
11//!   `aube config`, docs generation, parity audits).
12//! - [`values::resolved`] — one typed Rust function per supported
13//!   scalar setting. The
14//!   function signature *is* the type check — `auto_install_peers`
15//!   returns `Option<bool>`, `store_dir` returns `Option<String>`,
16//!   and calling either on the wrong type is a compile error.
17//!
18//! Downstream crates depend on this one so they never have to
19//! hand-maintain a getter whose spelling can drift from
20//! `settings.toml`.
21
22pub mod meta;
23pub mod values;
24
25pub use meta::{SettingMeta, all, find};
26pub use values::{
27    ResolveCtx, embedder_defaults, parse_bool, resolved, set_embedder_defaults,
28    set_global_cli_overrides, workspace_yaml_value,
29};