#env #build #environment-variables #target #retrieval

build-env

Extract information about the build process from the environment

6 releases (3 breaking)

Uses old Rust 2015

0.3.1 May 9, 2021
0.3.0 Sep 8, 2020
0.2.0 Aug 21, 2020
0.1.0 Aug 21, 2020
0.0.2 Jul 29, 2016
Download history 4130/week @ 2023-08-17 4207/week @ 2023-08-24 4165/week @ 2023-08-31 4294/week @ 2023-09-07 4138/week @ 2023-09-14 4002/week @ 2023-09-21 3469/week @ 2023-09-28 2824/week @ 2023-10-05 2061/week @ 2023-10-12 2636/week @ 2023-10-19 2045/week @ 2023-10-26 1837/week @ 2023-11-02 1973/week @ 2023-11-09 2433/week @ 2023-11-16 2308/week @ 2023-11-23 1823/week @ 2023-11-30

8,833 downloads per month
Used in 12 crates (2 directly)

Apache-2.0 OR MIT

13KB
237 lines

build-env

Get information about the build from environment variables

let mut be = build_env::BuildEnv::from_env().unwrap();
let _: Option<OsString> = be.var_os("CC");

Prints all used env vars in cargo dependency format:

cargo:rerun-if-env-changed=CC_target-triple
cargo:rerun-if-env-changed=CC_target_triple
cargo:rerun-if-env-changed=HOST_CC
cargo:rerun-if-env-changed=CC

Documentation Crates.io Travis

No runtime deps