We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
cargo:rustc-env
1 parent d8673d9 commit 1607a68Copy full SHA for 1607a68
src/doc/src/reference/build-scripts.md
@@ -192,6 +192,12 @@ unique identifier of a continuous integration server.
192
See also the [environment variables automatically included by
193
Cargo][env-cargo].
194
195
+> **Note**: These environment variables are also set when running an
196
+> executable with `cargo run` or `cargo test`. However, this usage is
197
+> discouraged since it ties the executable to Cargo's execution environment.
198
+> Normally, these environment variables should only be checked at compile-time
199
+> with the `env!` macro.
200
+
201
[env-macro]: ../../std/macro.env.html
202
[env-cargo]: environment-variables.md#environment-variables-cargo-sets-for-crates
203
0 commit comments