target-triple

Crates.iotarget-triple
lib.rstarget-triple
version0.1.3
sourcesrc
created_at2023-12-21 03:14:48.691246
updated_at2024-05-14 21:39:04.062817
descriptionTARGET and HOST triples
homepage
repositoryhttps://github.com/dtolnay/target-triple
max_upload_size
id1076256
size18,019
Lanthanum (github:zxtn:lanthanum)

documentation

https://docs.rs/target-triple

README

Rustc target triple

github crates.io docs.rs build status

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.
Commit count: 29

cargo fmt