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: cargo’s own runtime answer (cargo metadata merges every config layer exactly like a real build), falling back to the configured build-dir value (or the canonical default) when cargo cannot be asked.
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.