| 1 | //! Platform-dependent environment variables abstraction. |
| 2 | |
| 3 | #![forbid (unsafe_op_in_unsafe_fn)] |
| 4 | |
| 5 | #[cfg (any( |
| 6 | target_family = "unix" , |
| 7 | target_os = "hermit" , |
| 8 | all(target_vendor = "fortanix" , target_env = "sgx" ), |
| 9 | target_os = "solid_asp3" , |
| 10 | target_os = "uefi" , |
| 11 | target_os = "wasi" , |
| 12 | target_os = "xous" , |
| 13 | ))] |
| 14 | mod common; |
| 15 | |
| 16 | cfg_if::cfg_if! { |
| 17 | if #[cfg(target_family = "unix" )] { |
| 18 | mod unix; |
| 19 | pub use unix::*; |
| 20 | } else if #[cfg(target_family = "windows" )] { |
| 21 | mod windows; |
| 22 | pub use windows::*; |
| 23 | } else if #[cfg(target_os = "hermit" )] { |
| 24 | mod hermit; |
| 25 | pub use hermit::*; |
| 26 | } else if #[cfg(all(target_vendor = "fortanix" , target_env = "sgx" ))] { |
| 27 | mod sgx; |
| 28 | pub use sgx::*; |
| 29 | } else if #[cfg(target_os = "solid_asp3" )] { |
| 30 | mod solid; |
| 31 | pub use solid::*; |
| 32 | } else if #[cfg(target_os = "uefi" )] { |
| 33 | mod uefi; |
| 34 | pub use uefi::*; |
| 35 | } else if #[cfg(target_os = "wasi" )] { |
| 36 | mod wasi; |
| 37 | pub use wasi::*; |
| 38 | } else if #[cfg(target_os = "xous" )] { |
| 39 | mod xous; |
| 40 | pub use xous::*; |
| 41 | } else if #[cfg(target_os = "zkvm" )] { |
| 42 | mod zkvm; |
| 43 | pub use zkvm::*; |
| 44 | } else { |
| 45 | mod unsupported; |
| 46 | pub use unsupported::*; |
| 47 | } |
| 48 | } |
| 49 | |