Description
Problem
sometimes it would be convenient to do things like cargo run
within .cargo/config.toml
[target.wasm32-wasip2]
runner = "cargo run -p my_runner"
So that you can avoid a separate install process for the test runner.
The caveat of this is that cargo run
overwrites a bunch of environment variables that initially set by the cargo process that invoked the runner.
Proposed Solution
For cases such as this it would be nice to have an cargo run --env-var-prefix foo_ -p my_runner
this would then set variables like foo_OUT_DIR
etc.
Perhaps a better way would be to just have a rarely used Cargo.toml field to specify an env var prefix, so
my_runner/Cargo.toml
can use that, it would then be expected that my_runner/build.rs
take part in
understanding that this crate always uses that env prefix. That seems more acceptable to me anyways.
Notes
No response