Debian Codegraph @

debian/missing-sources/target-lexicon/examples/misc.rs

raw
1 extern crate target_lexicon;
2
3 use core::str::FromStr;
4 use target_lexicon::{Triple, HOST};
5
6 fn main() {
7 println!("The host triple is {}.", HOST);
8
9 let e = Triple::from_str("riscv32-unknown-unknown")
10 .expect("expected to recognize the RISC-V target")
11 .endianness()
12 .expect("expected to know the endianness of RISC-V");
13 println!("The endianness of RISC-V is {:?}.", e);
14 }