]>
git.proxmox.com Git - rustc.git/blob - library/std/src/os/mod.rs
1 //! OS-specific functionality.
3 #![stable(feature = "os", since = "1.0.0")]
4 #![allow(missing_docs, nonstandard_style, missing_debug_implementations)]
6 // When documenting libstd we want to show unix/windows/linux/wasi modules as these are the "main
7 // modules" that are used across platforms, so all modules are enabled when `cfg(doc)` is set.
8 // This should help show platform-specific functionality in a hopefully cross-platform way in the
10 // Note that we deliberately avoid `cfg_if!` here to work around a rust-analyzer bug that would make
11 // `std::os` submodules unusable: https://github.com/rust-analyzer/rust-analyzer/issues/6038
14 #[stable(feature = "rust1", since = "1.0.0")]
15 pub use crate::sys
::unix_ext
as unix
;
18 #[stable(feature = "rust1", since = "1.0.0")]
19 pub use crate::sys
::windows_ext
as windows
;
22 #[doc(cfg(target_os = "linux"))]
26 #[stable(feature = "wasi_ext_doc", since = "1.35.0")]
27 pub use crate::sys
::wasi_ext
as wasi
;
29 // If we're not documenting libstd then we just expose the main modules as we otherwise would.
32 #[cfg(any(unix, target_os = "hermit"))]
33 #[stable(feature = "rust1", since = "1.0.0")]
34 pub use crate::sys
::ext
as unix
;
38 #[stable(feature = "rust1", since = "1.0.0")]
39 pub use crate::sys
::ext
as windows
;
42 #[cfg(any(target_os = "linux", target_os = "l4re"))]
46 #[cfg(target_os = "wasi")]
49 #[cfg(target_os = "android")]
51 #[cfg(target_os = "dragonfly")]
53 #[cfg(target_os = "emscripten")]
55 #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
57 #[cfg(target_os = "freebsd")]
59 #[cfg(target_os = "fuchsia")]
61 #[cfg(target_os = "haiku")]
63 #[cfg(target_os = "illumos")]
65 #[cfg(target_os = "ios")]
67 #[cfg(target_os = "macos")]
69 #[cfg(target_os = "netbsd")]
71 #[cfg(target_os = "openbsd")]
73 #[cfg(target_os = "redox")]
75 #[cfg(target_os = "solaris")]
77 #[cfg(target_os = "vxworks")]