Profiles & Environments¶
Environment variable layers¶
Environment variables are resolved in layers. Later layers override earlier ones:
1. System environment
2. [env] section in Mustfile.toml
3. [env.<profile>] section
4. Recipe-level env field
5. MUST_ARGS environment variable
Global environment¶
Profile overrides¶
Select a profile:
Recipe-level environment¶
[recipe.build]
type = "rust-bin"
package = "my-app"
[recipe.build.env]
RUSTFLAGS = "-C target-cpu=native"
Variable interpolation¶
Use ${VAR} syntax for runtime expansion:
$VAR and ${VAR} are both supported. Undefined variables expand to empty strings.
MUST_ARGS¶
Pass extra flags from CI or wrappers:
Shell environment inheritance¶
Recipes inherit the full system environment plus all must-configured variables. This means:
PATHis available by default- Any env var set in CI (GitHub Actions, etc.) is accessible
- must env vars are layered on top, not replacements