fune/third_party/rust/target-lexicon/examples/misc.rs
Benjamin Bouvier da79779db2 Bug 1539406: Bump Cranelift to revision 542d799dd7a3b2cc; r=lth
This is the first time we pin a specific Cranelift commit hash to use in Gecko.
The target-lexicon hack is removed and instead we introduce a vendor patch for
cranelift-codegen/cranelift-wasm themselves.

Notable changes happen in top-level Cargo.toml, .cargo/config.in and
js/src/wasm/cranelift/Cargo.toml; the rest has been generated by `mach vendor
rust`.

Differential Revision: https://phabricator.services.mozilla.com/D27316

--HG--
extra : moz-landing-system : lando
2019-04-15 10:39:28 +00:00

14 lines
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);
}