Skip to main content

inherited_package_env

Function inherited_package_env 

Source
pub fn inherited_package_env() -> Vec<String>
Expand description

The variables of our environment that cargo sets for a process it runs, a test binary or cargo run: that package’s CARGO_PKG_* and CARGO_MANIFEST_*.

A cargo started from such a process must go without them. Build scripts track some of them with rerun-if-env-changed (ring does), and cargo compares them with its own environment, so that build and the next one from a shell would each find them changed and rebuild those crates, and everything on them.