rustydocs

Environment variables

Environment variables rusty reads and sets during builds.

User-configured

VariableDefaultDescription
RUSTY_HOME~/.rustyGlobal data root (store, cache, toolchains, shims)
RUSTY_TOOLCHAIN(from env use)Override active toolchain name
RUSTY_JOBS(unset)Shared parallel job budget for rusty test (overrides -j / CARGO_BUILD_JOBS)
RUSTY_TEST_CACHEonSet to 0 / false / off to disable file-test binary compile cache

Set by rusty during builds

VariableDescription
RUSTY_PROJECT_ROOTWorkspace root during compile
CARGO_HOMECAS-backed cargo home (not ~/.cargo)
CARGO_TARGET_DIR<workspace>/.rusty/target
CARGO_PROFILEdebug or release
RUSTC_WRAPPER$RUSTY_HOME/bin/rusty-wrapper for layer caching

PATH

Add $RUSTY_HOME/bin after rusty env use so cargo, rustc, and related tools resolve through rusty shims.

export PATH="${RUSTY_HOME:-$HOME/.rusty}/bin:$PATH"

Example: CI job

export RUSTY_HOME=/cache/rusty
export PATH="$RUSTY_HOME/bin:$PATH"

rusty env use stable
rusty fetch
rusty build --release

Example: nightly override

cargo +nightly check
# or
RUSTY_TOOLCHAIN=nightly rustc -vV

On this page