std/sys/args/
mod.rs

1//! Platform-dependent command line arguments abstraction.
2
3#![forbid(unsafe_op_in_unsafe_fn)]
4
5#[cfg(any(
6    all(target_family = "unix", not(any(target_os = "espidf", target_os = "vita"))),
7    target_family = "windows",
8    target_os = "hermit",
9    target_os = "motor",
10    target_os = "uefi",
11    target_os = "wasi",
12    target_os = "xous",
13))]
14mod common;
15
16cfg_select! {
17    any(
18        all(target_family = "unix", not(any(target_os = "espidf", target_os = "vita"))),
19        target_os = "hermit",
20    ) => {
21        mod unix;
22        pub use unix::*;
23    }
24    target_family = "windows" => {
25        mod windows;
26        pub use windows::*;
27    }
28    all(target_vendor = "fortanix", target_env = "sgx") => {
29        mod sgx;
30        pub use sgx::*;
31    }
32    target_os = "motor" => {
33        mod motor;
34        pub use motor::*;
35    }
36    target_os = "uefi" => {
37        mod uefi;
38        pub use uefi::*;
39    }
40    all(target_os = "wasi", target_env = "p1") => {
41        mod wasip1;
42        pub use wasip1::*;
43    }
44    all(target_os = "wasi", any(target_env = "p2", target_env = "p3")) => {
45        mod wasip2;
46        pub use wasip2::*;
47    }
48    target_os = "xous" => {
49        mod xous;
50        pub use xous::*;
51    }
52    target_os = "zkvm" => {
53        mod zkvm;
54        pub use zkvm::*;
55    }
56    _ => {
57        mod unsupported;
58        pub use unsupported::*;
59    }
60}