gecko-dev/third_party/rust/target-lexicon-0.9.0/examples/misc.rs

15 строки
405 B
Rust

extern crate target_lexicon;
use core::str::FromStr;
use target_lexicon::{Triple, HOST};
fn main() {
println!("The host triple is {}.", HOST);
let e = Triple::from_str("riscv32-unknown-unknown")
.expect("expected to recognize the RISC-V target")
.endianness()
.expect("expected to know the endianness of RISC-V");
println!("The endianness of RISC-V is {:?}.", e);
}