1 //! OS-specific functionality.
3 #![stable(feature = "os", since = "1.0.0")]
4 #![allow(missing_docs, nonstandard_style, missing_debug_implementations)]
9 // When documenting libstd we want to show unix/windows/linux modules as
10 // these are the "main modules" that are used across platforms. This
11 // should help show platform-specific functionality in a hopefully
12 // cross-platform way in the documentation
14 #[stable(feature = "rust1", since = "1.0.0")]
15 pub use crate::sys::unix_ext as unix;
17 #[stable(feature = "rust1", since = "1.0.0")]
18 pub use crate::sys::windows_ext as windows;
20 #[doc(cfg(target_os = "linux"))]
24 // If we're not documenting libstd then we just expose the main modules
25 // as we otherwise would.
27 #[cfg(any(target_os = "redox", unix, target_os = "vxworks"))]
28 #[stable(feature = "rust1", since = "1.0.0")]
29 pub use crate::sys::ext as unix;
32 #[stable(feature = "rust1", since = "1.0.0")]
33 pub use crate::sys::ext as windows;
35 #[cfg(any(target_os = "linux", target_os = "l4re"))]
41 #[cfg(target_os = "android")]
43 #[cfg(target_os = "dragonfly")]
45 #[cfg(target_os = "emscripten")]
47 #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
49 #[cfg(target_os = "freebsd")]
51 #[cfg(target_os = "fuchsia")]
53 #[cfg(target_os = "haiku")]
55 #[cfg(target_os = "ios")]
57 #[cfg(target_os = "macos")]
59 #[cfg(target_os = "netbsd")]
61 #[cfg(target_os = "openbsd")]
63 #[cfg(target_os = "redox")]
65 #[cfg(target_os = "solaris")]
67 #[cfg(target_os = "vxworks")]
69 #[cfg(target_os = "wasi")]