warpgate_api/host.rs
1use crate::api_struct;
2use crate::virtual_path::VirtualPath;
3
4pub use system_env::{SystemArch as HostArch, SystemLibc as HostLibc, SystemOS as HostOS};
5
6api_struct!(
7 /// Information about the host environment (the current runtime).
8 pub struct HostEnvironment {
9 /// The architecture of the host system.
10 pub arch: HostArch,
11
12 /// Whether the plugin is running in a CI environment.
13 pub ci: bool,
14
15 /// The libc implementation of the host system.
16 pub libc: HostLibc,
17
18 /// The operating system of the host system.
19 pub os: HostOS,
20
21 /// Virtual path to the home directory of the current user.
22 pub home_dir: VirtualPath,
23 }
24);
25
26api_struct!(
27 /// Information about the current testing environment.
28 pub struct TestEnvironment {
29 /// Whether the current test is running in a CI environment.
30 pub ci: bool,
31
32 /// Virtual path to the sandbox directory for the current test.
33 pub sandbox: VirtualPath,
34 }
35);