| 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 = "uefi" , |
| 10 | target_os = "wasi" , |
| 11 | target_os = "xous" , |
| 12 | ))] |
| 13 | mod common; |
| 14 | |
| 15 | cfg_if::cfg_if! { |
| 16 | if #[cfg(any( |
| 17 | all(target_family = "unix" , not(any(target_os = "espidf" , target_os = "vita" ))), |
| 18 | target_os = "hermit" , |
| 19 | ))] { |
| 20 | mod unix; |
| 21 | pub use unix::*; |
| 22 | } else if #[cfg(target_family = "windows" )] { |
| 23 | mod windows; |
| 24 | pub use windows::*; |
| 25 | } else if #[cfg(all(target_vendor = "fortanix" , target_env = "sgx" ))] { |
| 26 | mod sgx; |
| 27 | pub use sgx::*; |
| 28 | } else if #[cfg(target_os = "uefi" )] { |
| 29 | mod uefi; |
| 30 | pub use uefi::*; |
| 31 | } else if #[cfg(target_os = "wasi" )] { |
| 32 | mod wasi; |
| 33 | pub use wasi::*; |
| 34 | } else if #[cfg(target_os = "xous" )] { |
| 35 | mod xous; |
| 36 | pub use xous::*; |
| 37 | } else if #[cfg(target_os = "zkvm" )] { |
| 38 | mod zkvm; |
| 39 | pub use zkvm::*; |
| 40 | } else { |
| 41 | mod unsupported; |
| 42 | pub use unsupported::*; |
| 43 | } |
| 44 | } |
| 45 | |