3 releases
0.1.2 | Dec 21, 2023 |
---|---|
0.1.1 | Dec 21, 2023 |
0.1.0 | Dec 21, 2023 |
#289 in Build Utils
2,062 downloads per month
Used in 6 crates
(3 directly)
7KB
Rustc target triple
Access the $TARGET and $HOST rustc target triples that Cargo supplies to build scripts.
Example
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",
);
}
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.