Environment Variables
Flux reads and sets a number of environment variables. Here is a list of them, organized by when Flux interacts with them.
Environment variables Flux reads
FLUXFLAGS— Space-separated flags passed bycargo fluxto every package checked by Flux, e.g.,FLUXFLAGS="-Ftimings" cargo flux. Replacesbuild.fluxflags. See how flags are combined.FLUX_ENCODED_FLAGS— LikeFLUXFLAGS, but flags are separated by the0x1fcharacter (ASCII Unit Separator), which allows flags containing spaces. Takes precedence overFLUXFLAGS, like cargo'sCARGO_ENCODED_RUSTFLAGS.FLUX_HOME— The Flux home directory, which holds the user configuration ($FLUX_HOME/config.toml) and the default sysroot. Defaults to$HOME/.flux. See Flux Home.FLUX_SYSROOT— The sysroot used byfluxandcargo flux, i.e., the directory containingflux-driverand the precompiled Flux libraries. Defaults to$FLUX_HOME/sysroot.FLUX_DRIVER— Path to theflux-driverbinary. Defaults to$FLUX_SYSROOT/flux-driver.
Environment variables cargo flux sets
cargo flux runs cargo with the following variables:
RUSTC— Set to the path offlux-driver, so that cargo runs Flux instead ofrustc. It is set even ifRUSTCis already set.RUSTC_WRAPPER— Set to an empty value to avoid conflicts with other wrappers.
FLUX_CARGO and FLUX_BUILD_SYSROOT are also set. They are used internally by the driver and
should not be set manually.