Sha256: d742406eba58f35c4c9f1041e506bb63d6c0eb752c2e88f4a6646538ef1aba38

Contents?: true

Size: 1.52 KB

Versions: 34

Compression:

Stored size: 1.52 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);
    }

    #[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

34 entries across 34 versions & 1 rubygems

Version Path
wasmtime-28.0.0 ./ext/cargo-vendor/target-lexicon-0.12.16/src/host.rs
wasmtime-27.0.0 ./ext/cargo-vendor/target-lexicon-0.12.16/src/host.rs
wasmtime-26.0.0 ./ext/cargo-vendor/target-lexicon-0.12.16/src/host.rs
wasmtime-25.0.2 ./ext/cargo-vendor/target-lexicon-0.12.16/src/host.rs
wasmtime-25.0.1 ./ext/cargo-vendor/target-lexicon-0.12.16/src/host.rs
wasmtime-25.0.0 ./ext/cargo-vendor/target-lexicon-0.12.16/src/host.rs
wasmtime-24.0.0 ./ext/cargo-vendor/target-lexicon-0.12.16/src/host.rs
wasmtime-23.0.2 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-22.0.0 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-21.0.1 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-20.0.2 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-20.0.0 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-18.0.3 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-17.0.1 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-17.0.0 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-16.0.0 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-15.0.1 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-15.0.0 ./ext/cargo-vendor/target-lexicon-0.12.13/src/host.rs
wasmtime-14.0.4 ./ext/cargo-vendor/target-lexicon-0.12.12/src/host.rs
wasmtime-14.0.3 ./ext/cargo-vendor/target-lexicon-0.12.12/src/host.rs