ubi 0.2.3

The Universal Binary Installer library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::env;

// mostly copied from the current_platform crate.
fn main() {
    // Cargo sets the host and target env vars for build scripts, but not
    // crates:
    // https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts
    // So we just re-export them to the crate code.
    println!("cargo:rustc-env=TARGET={}", env::var("TARGET").unwrap());
    // By default Cargo only runs the build script when a file changes.  This
    // makes it re-run on target change
    println!("cargo:rerun-if-changed-env=TARGET");
}