Expand description
Loading of .flux/config.toml, the configuration of a cargo flux invocation.
Configuration files are discovered and merged following the same rules cargo uses for
.cargo/config.toml:
- Starting from the current directory,
.flux/config.tomlis read in every ancestor directory, followed by$FLUX_HOME/config.toml(~/.flux/config.tomlby default) if it wasnโt already found. - Files closer to the current directory take precedence. Tables are merged key by key, arrays are concatenated (with items from higher precedence files placed later), and any other value is replaced.
- Relative paths are resolved relative to the parent of the directory containing the file,
e.g., a path in
/project/.flux/config.tomlis relative to/project.
Settings can be overridden for specific packages in [package.<spec>] tables, where <spec>
is a package name, <name>@<version>, or * for all packages that are not workspace members.
As in cargoโs profile overrides, a packageโs settings are taken from its own table, then from
[package."*"], and then from the top level.
Modulesยง
- value ๐
- Untyped configuration values that remember where they were written.
Structsยง
- Build
- The
[build]table. - Cache
- Debug
- Diagnostics
- Fixpoint
- Flux
Config - The merged content of all configuration files.
- Located
- A configuration value together with its
Location. It can only be deserialized from aConfigValue. - Location
- Where a configuration value was written.
- Package
Config - The configuration of a single package.
- Package
Override ๐ - A
[package.<spec>]table. - Settings
- Settings that are translated into flags for the driver.
- Stats
Enumsยง
- String
List - A list of strings written either as an array or as a space-separated string.
- Trace
Level
Constantsยง
- ALL_
NON_ ๐MEMBERS - Spec matching all packages that are not workspace members.
- BUILD_
KEY ๐ - Top-level keys that are not
Settings. - FLUXFLAGS
- Environment variable with space-separated flags. Takes precedence over
build.fluxflags. - FLUXFLAGS_
KEY ๐ - Key for flags in a
[package.<spec>]table. - FLUX_
ENCODED_ FLAGS - Environment variable with flags separated by
0x1f(ASCII Unit Separator). Takes precedence overFLUXFLAGS. Like cargoโsCARGO_ENCODED_RUSTFLAGS, it allows flags containing spaces. - PACKAGE_
KEY ๐
Functionsยง
- discover ๐
- Returns the configuration files that apply to
cwd, ordered from highest to lowest precedence. - read_
file ๐ - Reads a configuration file and validates it on its own, so invalid values are reported even if another file overrides them.
- same_
file ๐ - spec_
matches ๐ - Whether
specisnameorname@version. - split_
space_ ๐separated