mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Auto merge of #10550 - phil-opp:bindeps-doc-fix, r=weihanglo
Fix docs: Bindeps env vars are passed to build script at runtime
The environment variables are not available through the `env!` macro. Instead, they are passed by cargo when the build script is invoked.
The current test suite confirms this:
fc5035d698/tests/testsuite/artifact_dep.rs (L524-L548)
This commit is contained in:
commit
4777c22168
@ -886,7 +886,7 @@ bar = { artifact = "cdylib", version = "1.0", target = "wasm32-unknown-unknown"
|
||||
|
||||
```rust
|
||||
fn main() {
|
||||
wasm::run_file(env!("CARGO_CDYLIB_FILE_BAR"));
|
||||
wasm::run_file(std::env::var("CARGO_CDYLIB_FILE_BAR").unwrap());
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user