Coverage Report

Created: 2024-05-16 12:16

/__w/smoldot/smoldot/repo/target/debug/build/target-lexicon-50af4f3b0cef4ec3/out/host.rs
Line
Count
Source (jump to first uncovered line)
1
2
#[allow(unused_imports)]
3
use crate::Aarch64Architecture::*;
4
#[allow(unused_imports)]
5
use crate::ArmArchitecture::*;
6
#[allow(unused_imports)]
7
use crate::CustomVendor;
8
#[allow(unused_imports)]
9
use crate::Mips32Architecture::*;
10
#[allow(unused_imports)]
11
use crate::Mips64Architecture::*;
12
#[allow(unused_imports)]
13
use crate::Riscv32Architecture::*;
14
#[allow(unused_imports)]
15
use crate::Riscv64Architecture::*;
16
#[allow(unused_imports)]
17
use crate::X86_32Architecture::*;
18
19
/// The `Triple` of the current host.
20
pub const HOST: Triple = Triple {
21
    architecture: Architecture::X86_64,
22
    vendor: Vendor::Unknown,
23
    operating_system: OperatingSystem::Linux,
24
    environment: Environment::Gnu,
25
    binary_format: BinaryFormat::Elf,
26
};
27
28
impl Architecture {
29
    /// Return the architecture for the current host.
30
0
    pub const fn host() -> Self {
31
0
        Architecture::X86_64
32
0
    }
33
}
34
35
impl Vendor {
36
    /// Return the vendor for the current host.
37
0
    pub const fn host() -> Self {
38
0
        Vendor::Unknown
39
0
    }
40
}
41
42
impl OperatingSystem {
43
    /// Return the operating system for the current host.
44
0
    pub const fn host() -> Self {
45
0
        OperatingSystem::Linux
46
0
    }
47
}
48
49
impl Environment {
50
    /// Return the environment for the current host.
51
0
    pub const fn host() -> Self {
52
0
        Environment::Gnu
53
0
    }
54
}
55
56
impl BinaryFormat {
57
    /// Return the binary format for the current host.
58
0
    pub const fn host() -> Self {
59
0
        BinaryFormat::Elf
60
0
    }
61
}
62
63
impl Triple {
64
    /// Return the triple for the current host.
65
276
    pub const fn host() -> Self {
66
276
        Self {
67
276
            architecture: Architecture::X86_64,
68
276
            vendor: Vendor::Unknown,
69
276
            operating_system: OperatingSystem::Linux,
70
276
            environment: Environment::Gnu,
71
276
            binary_format: BinaryFormat::Elf,
72
276
        }
73
276
    }
74
}