detect-targets 0.1.31

Detect the target of the env at runtime
Documentation
1
2
3
4
5
6
7
8
9
fn main() {
    println!("cargo:rerun-if-changed=build.rs");

    // Fetch build target and define this for the compiler
    println!(
        "cargo:rustc-env=TARGET={}",
        std::env::var("TARGET").unwrap()
    );
}