1 #[allow(unused_imports)] 2 use crate::Aarch64Architecture::*; 3 #[allow(unused_imports)] 4 use crate::ArmArchitecture::*; 5 #[allow(unused_imports)] 6 use crate::CustomVendor; 7 8 /// The `Triple` of the current host. 9 pub const HOST: Triple = Triple { 10 architecture: Architecture::Aarch64(Aarch64), 11 vendor: Vendor::Unknown, 12 operating_system: OperatingSystem::Linux, 13 environment: Environment::Gnu, 14 binary_format: BinaryFormat::Elf, 15 }; 16 17 impl Architecture { 18 /// Return the architecture for the current host. host() -> Self19 pub const fn host() -> Self { 20 Architecture::Aarch64(Aarch64) 21 } 22 } 23 24 impl Vendor { 25 /// Return the vendor for the current host. host() -> Self26 pub const fn host() -> Self { 27 Vendor::Unknown 28 } 29 } 30 31 impl OperatingSystem { 32 /// Return the operating system for the current host. host() -> Self33 pub const fn host() -> Self { 34 OperatingSystem::Linux 35 } 36 } 37 38 impl Environment { 39 /// Return the environment for the current host. host() -> Self40 pub const fn host() -> Self { 41 Environment::Gnu 42 } 43 } 44 45 impl BinaryFormat { 46 /// Return the binary format for the current host. host() -> Self47 pub const fn host() -> Self { 48 BinaryFormat::Elf 49 } 50 } 51 52 impl Triple { 53 /// Return the triple for the current host. host() -> Self54 pub const fn host() -> Self { 55 Self { 56 architecture: Architecture::Aarch64(Aarch64), 57 vendor: Vendor::Unknown, 58 operating_system: OperatingSystem::Linux, 59 environment: Environment::Gnu, 60 binary_format: BinaryFormat::Elf, 61 } 62 } 63 } 64