]> git.lizzy.rs Git - rust.git/blob - src/libstd/os/mod.rs
Rollup merge of #68388 - varkor:toogeneric-wf, r=eddyb
[rust.git] / src / libstd / os / mod.rs
1 //! OS-specific functionality.
2
3 #![stable(feature = "os", since = "1.0.0")]
4 #![allow(missing_docs, nonstandard_style, missing_debug_implementations)]
5
6 cfg_if::cfg_if! {
7     if #[cfg(doc)] {
8
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
13
14         #[stable(feature = "rust1", since = "1.0.0")]
15         pub use crate::sys::unix_ext as unix;
16
17         #[stable(feature = "rust1", since = "1.0.0")]
18         pub use crate::sys::windows_ext as windows;
19
20         #[doc(cfg(target_os = "linux"))]
21         pub mod linux;
22     } else {
23
24         // If we're not documenting libstd then we just expose the main modules
25         // as we otherwise would.
26
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;
30
31         #[cfg(windows)]
32         #[stable(feature = "rust1", since = "1.0.0")]
33         pub use crate::sys::ext as windows;
34
35         #[cfg(any(target_os = "linux", target_os = "l4re"))]
36         pub mod linux;
37
38     }
39 }
40
41 #[cfg(target_os = "android")]
42 pub mod android;
43 #[cfg(target_os = "dragonfly")]
44 pub mod dragonfly;
45 #[cfg(target_os = "emscripten")]
46 pub mod emscripten;
47 #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
48 pub mod fortanix_sgx;
49 #[cfg(target_os = "freebsd")]
50 pub mod freebsd;
51 #[cfg(target_os = "fuchsia")]
52 pub mod fuchsia;
53 #[cfg(target_os = "haiku")]
54 pub mod haiku;
55 #[cfg(target_os = "ios")]
56 pub mod ios;
57 #[cfg(target_os = "macos")]
58 pub mod macos;
59 #[cfg(target_os = "netbsd")]
60 pub mod netbsd;
61 #[cfg(target_os = "openbsd")]
62 pub mod openbsd;
63 #[cfg(target_os = "redox")]
64 pub mod redox;
65 #[cfg(target_os = "solaris")]
66 pub mod solaris;
67 #[cfg(target_os = "vxworks")]
68 pub mod vxworks;
69 #[cfg(target_os = "wasi")]
70 pub mod wasi;
71
72 pub mod raw;