TARGET and HOST triples
APACHE-2.0 License
Access the $TARGET and $HOST rustc target triples that Cargo supplies to build scripts.
fn main() {
// As a const &str:
assert_eq!(target_triple::TARGET, "x86_64-unknown-linux-gnu");
// As a string literal:
assert_eq!(
concat!("target/", target_triple::target!()),
"target/x86_64-unknown-linux-gnu",
);
}