Skip to main content

Module config

Module config 

Source
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.toml is read in every ancestor directory, followed by $FLUX_HOME/config.toml (~/.flux/config.toml by 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.toml is 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
FluxConfig
The merged content of all configuration files.
Located
A configuration value together with its Location. It can only be deserialized from a ConfigValue.
Location
Where a configuration value was written.
PackageConfig
The configuration of a single package.
PackageOverride ๐Ÿ”’
A [package.<spec>] table.
Settings
Settings that are translated into flags for the driver.
Stats

Enumsยง

StringList
A list of strings written either as an array or as a space-separated string.
TraceLevel

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 over FLUXFLAGS. Like cargoโ€™s CARGO_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 spec is name or name@version.
split_space_separated ๐Ÿ”’