Skip to content

Commit f671f0b

Browse files
chrjabssunshowers
authored andcommitted
[site] describe build script env vars set
1 parent eb1a16d commit f671f0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

site/src/docs/configuration/env-vars.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ Nextest also sets these environment variables at runtime, matching the behavior
152152

153153
Additionally, environment variables specified in [the `[env]` section of `.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html#env) are also set.
154154

155+
Since `cargo test` also sets variables specified in the build script via [`cargo::rustc-env`](https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-env) at test runtime, `nextest` does the same.
156+
However, note that [`cargo` discourages using these variables at runtime](https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-env).
157+
155158
### Dynamic library paths
156159

157160
Nextest sets the dynamic library path at runtime, similar to [what Cargo does](https://doc.rust-lang.org/cargo/reference/environment-variables.html#dynamic-library-paths). This helps with locating shared libraries that are part of the build process. The variable name depends on the platform:

0 commit comments

Comments
 (0)