Sha256: d891acccd8a2a7f0ba70e8928853c256f91d943db051126022e0ddb849b03470
Contents?: true
Size: 1.53 KB
Versions: 2
Compression:
Stored size: 1.53 KB
Contents
use crate::{Architecture, BinaryFormat, Environment, OperatingSystem, Triple, Vendor}; // Include the implementations of the `HOST` object containing information // about the current host. include!(concat!(env!("OUT_DIR"), "/host.rs")); #[cfg(test)] mod tests { #[cfg(target_os = "aix")] #[test] fn test_aix() { use super::*; assert_eq!(OperatingSystem::host(), OperatingSystem::Aix); } #[cfg(target_os = "linux")] #[test] fn test_linux() { use super::*; assert_eq!(OperatingSystem::host(), OperatingSystem::Linux); } #[cfg(target_os = "macos")] #[test] fn test_macos() { use super::*; assert_eq!(OperatingSystem::host(), OperatingSystem::Darwin(None)); } #[cfg(windows)] #[test] fn test_windows() { use super::*; assert_eq!(OperatingSystem::host(), OperatingSystem::Windows); } #[cfg(target_pointer_width = "16")] #[test] fn test_ptr16() { use super::*; assert_eq!(Architecture::host().pointer_width().unwrap().bits(), 16); } #[cfg(target_pointer_width = "32")] #[test] fn test_ptr32() { use super::*; assert_eq!(Architecture::host().pointer_width().unwrap().bits(), 32); } #[cfg(target_pointer_width = "64")] #[test] fn test_ptr64() { use super::*; assert_eq!(Architecture::host().pointer_width().unwrap().bits(), 64); } #[test] fn host_object() { use super::*; assert_eq!(HOST, Triple::host()); } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wasmtime-30.0.2 | ./ext/cargo-vendor/target-lexicon-0.13.2/src/host.rs |
wasmtime-29.0.0 | ./ext/cargo-vendor/target-lexicon-0.13.1/src/host.rs |