Skip to main content

Module config

Module config 

Source
Expand description

Editing Cargo’s global config.toml — the single source of truth.

epicenter keeps NO state file of its own: the shared-cache decision lives in $CARGO_HOME/config.toml as the [build] build-dir key, where cargo (and any other tool) can read it. epicenter writes that key (setup), reads it back, and verifies it (doctor).

Structs§

SetupReport

Enums§

CargoEdit
What an edit to Cargo’s config changed.

Functions§

cache_root
The effective shared-cache root. This is the global trust anchor ($CARGO_HOME/config.toml, or the canonical default); project configs are read only to detect and refuse a shadowing build-dir. cargo metadata is deliberately not executed (it would trust/execute project config).
cargo_config_path
Cargo’s global config file: $CARGO_HOME/config.toml. Settings there apply to every project on the machine.
cargo_configured
Look up a [build] key in Cargo’s global config file on disk.
cargo_configured_in
Look up a key in any table of Cargo’s global config file.
normalize_root_input
The full epicenter setup orchestration: compute the decision, make the directory, and write/merge the cargo config. Normalize a user-provided --cache-root value.
read_build_table_key
Read a [build] key from ANY cargo config file — doctor uses this to scan the ancestor .cargo/config.toml chain for shadowing values. Read-only.
read_table_key
Parse key = value out of any [table] of a cargo config text.
setup
Priority: CLI root > stored override (~/.epicenter/config.toml) > default template. --cache-root and --use-default rewrite the stored decision; without them the stored decision (if any) stays untouched.
trusted_cache_root
The trusted root: the global $CARGO_HOME/config.toml build-dir value, or the canonical default template. Never reads a project config.