Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions doc/book/src/reference/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ See the [configuration chapter][config-env] for more details.
In summary, the supported environment variables are:

* `CARGO_ALIAS_<name>` --- Command aliases, see [`alias`].
* `CARGO_BUILD_WARNINGS` --- The effective level of lint warnings for local packages, see [`build.warnings`].
* `CARGO_BUILD_JOBS` --- Number of parallel jobs, see [`build.jobs`].
* `CARGO_BUILD_RUSTC` --- The `rustc` executable, see [`build.rustc`].
* `CARGO_BUILD_RUSTC_WRAPPER` --- The `rustc` wrapper, see [`build.rustc-wrapper`].
Expand All @@ -102,6 +103,7 @@ In summary, the supported environment variables are:
* `CARGO_BUILD_DEP_INFO_BASEDIR` --- Dep-info relative directory, see [`build.dep-info-basedir`].
* `CARGO_CACHE_AUTO_CLEAN_FREQUENCY` --- Configures how often automatic cache cleaning runs, see [`cache.auto-clean-frequency`].
* `CARGO_CARGO_NEW_VCS` --- The default source control system with [`cargo new`], see [`cargo-new.vcs`].
* `CARGO_CREDENTIAL_ALIAS_<name>` --- Credential provider aliases, see [`credential-alias`].
* `CARGO_FUTURE_INCOMPAT_REPORT_FREQUENCY` --- How often we should generate a future incompat report notification, see [`future-incompat-report.frequency`].
* `CARGO_HTTP_DEBUG` --- Enables HTTP debugging, see [`http.debug`].
* `CARGO_HTTP_PROXY` --- Enables HTTP proxy, see [`http.proxy`].
Expand Down Expand Up @@ -132,18 +134,25 @@ In summary, the supported environment variables are:
* `CARGO_REGISTRIES_<name>_CREDENTIAL_PROVIDER` --- Credential provider for a registry, see [`registries.<name>.credential-provider`].
* `CARGO_REGISTRIES_<name>_INDEX` --- URL of a registry index, see [`registries.<name>.index`].
* `CARGO_REGISTRIES_<name>_TOKEN` --- Authentication token of a registry, see [`registries.<name>.token`].
* `CARGO_REGISTRIES_CRATES_IO_PROTOCOL` --- The protocol used to access [crates.io], see [`registries.crates-io.protocol`].
* `CARGO_REGISTRY_CREDENTIAL_PROVIDER` --- Credential provider for [crates.io], see [`registry.credential-provider`].
* `CARGO_REGISTRY_DEFAULT` --- Default registry for the `--registry` flag, see [`registry.default`].
* `CARGO_REGISTRY_GLOBAL_CREDENTIAL_PROVIDERS` --- Credential providers for registries that do not have a specific provider defined. See [`registry.global-credential-providers`].
* `CARGO_REGISTRY_TOKEN` --- Authentication token for [crates.io], see [`registry.token`].
* `CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS` --- How incompatible Rust versions are treated during dependency resolution, see [`resolver.incompatible-rust-versions`].
* `CARGO_RESOLVER_LOCKFILE_PATH` --- The path to the lockfile, see [`resolver.lockfile-path`].
* `CARGO_TARGET_<triple>_LINKER` --- The linker to use, see [`target.<triple>.linker`]. The triple must be [converted to uppercase and underscores](config.md#environment-variables).
* `CARGO_TARGET_<triple>_RUNNER` --- The executable runner, see [`target.<triple>.runner`].
* `CARGO_TARGET_<triple>_RUSTFLAGS` --- Extra `rustc` flags for a target, see [`target.<triple>.rustflags`].
* `CARGO_TARGET_<triple>_RUSTDOCFLAGS` --- Extra `rustdoc` flags for a target, see [`target.<triple>.rustdocflags`].
* `CARGO_TERM_QUIET` --- Quiet mode, see [`term.quiet`].
* `CARGO_TERM_VERBOSE` --- The default terminal verbosity, see [`term.verbose`].
* `CARGO_TERM_COLOR` --- The default color mode, see [`term.color`].
* `CARGO_TERM_HYPERLINKS` --- Whether hyperlinks are used in the terminal, see [`term.hyperlinks`].
* `CARGO_TERM_UNICODE` --- Whether terminal output can use non-ASCII Unicode characters, see [`term.unicode`].
* `CARGO_TERM_PROGRESS_WHEN` --- The default progress bar showing mode, see [`term.progress.when`].
* `CARGO_TERM_PROGRESS_WIDTH` --- The default progress bar width, see [`term.progress.width`].
* `CARGO_TERM_PROGRESS_TERM_INTEGRATION` --- Whether progress is reported to the terminal emulator, see [`term.progress.term-integration`].

[`cargo doc`]: ../commands/cargo-doc.md
[`cargo install`]: ../commands/cargo-install.md
Expand All @@ -154,6 +163,7 @@ In summary, the supported environment variables are:
[crates.io]: https://crates.io/
[incremental compilation]: profiles.md#incremental
[`alias`]: config.md#alias
[`build.warnings`]: config.md#buildwarnings
[`build.jobs`]: config.md#buildjobs
[`build.rustc`]: config.md#buildrustc
[`build.rustc-wrapper`]: config.md#buildrustc-wrapper
Expand All @@ -166,6 +176,7 @@ In summary, the supported environment variables are:
[`build.rustdocflags`]: config.md#buildrustdocflags
[`build.incremental`]: config.md#buildincremental
[`build.dep-info-basedir`]: config.md#builddep-info-basedir
[`credential-alias`]: config.md#credential-alias
[`doc.browser`]: config.md#docbrowser
[`cache.auto-clean-frequency`]: config.md#cacheauto-clean-frequency
[`cargo-new.name`]: config.md#cargo-newname
Expand Down Expand Up @@ -198,21 +209,28 @@ In summary, the supported environment variables are:
[`profile.<name>.rpath`]: config.md#profilenamerpath
[`profile.<name>.split-debuginfo`]: config.md#profilenamesplit-debuginfo
[`profile.<name>.strip`]: config.md#profilenamestrip
[`resolver.lockfile-path`]: config.md#resolverlockfile-path
[`resolver.incompatible-rust-versions`]: config.md#resolverincompatible-rust-versions
[`registries.<name>.credential-provider`]: config.md#registriesnamecredential-provider
[`registries.<name>.index`]: config.md#registriesnameindex
[`registries.<name>.token`]: config.md#registriesnametoken
[`registries.crates-io.protocol`]: config.md#registriescrates-ioprotocol
[`registry.credential-provider`]: config.md#registrycredential-provider
[`registry.default`]: config.md#registrydefault
[`registry.global-credential-providers`]: config.md#registryglobal-credential-providers
[`registry.token`]: config.md#registrytoken
[`target.<triple>.linker`]: config.md#targettriplelinker
[`target.<triple>.runner`]: config.md#targettriplerunner
[`target.<triple>.rustflags`]: config.md#targettriplerustflags
[`target.<triple>.rustdocflags`]: config.md#targettriplerustdocflags
[`term.quiet`]: config.md#termquiet
[`term.verbose`]: config.md#termverbose
[`term.color`]: config.md#termcolor
[`term.hyperlinks`]: config.md#termhyperlinks
[`term.unicode`]: config.md#termunicode
[`term.progress.when`]: config.md#termprogresswhen
[`term.progress.width`]: config.md#termprogresswidth
[`term.progress.term-integration`]: config.md#termprogressterm-integration

## Environment variables Cargo sets for crates

Expand Down