Skip to main content

inject_cargo_package_env

Function inject_cargo_package_env 

Source
pub(crate) fn inject_cargo_package_env(env: &mut Env, package: &PackageData)
Expand description

Recreates the compile-time environment variables that Cargo sets.

Should be synced with https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates

FIXME: ask Cargo to provide this data instead of re-deriving.