]>
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)]
8 // The code below could be written clearer using `cfg_if!`. However, the items below are
9 // publicly exported by `std` and external tools can have trouble analysing them because of the use
10 // of a macro that is not vendored by Rust and included in the toolchain.
11 // See https://github.com/rust-analyzer/rust-analyzer/issues/6038.
13 // On certain platforms right now the "main modules" modules that are
14 // documented don't compile (missing things in `libc` which is empty),
15 // so just omit them with an empty module and add the "unstable" attribute.
17 // Unix, linux, wasi and windows are handled a bit differently.
21 all(target_arch
= "wasm32", not(target_os
= "wasi")),
22 all(target_vendor
= "fortanix", target_env
= "sgx")
25 #[unstable(issue = "none", feature = "std_internals")]
30 all(target_arch
= "wasm32", not(target_os
= "wasi")),
31 all(target_vendor
= "fortanix", target_env
= "sgx")
34 #[unstable(issue = "none", feature = "std_internals")]
39 all(target_arch
= "wasm32", not(target_os
= "wasi")),
40 all(target_vendor
= "fortanix", target_env
= "sgx")
43 #[unstable(issue = "none", feature = "std_internals")]
48 all(target_arch
= "wasm32", not(target_os
= "wasi")),
49 all(target_vendor
= "fortanix", target_env
= "sgx")
52 #[unstable(issue = "none", feature = "std_internals")]
59 all(target_arch
= "wasm32", not(target_os
= "wasi")),
60 all(target_vendor
= "fortanix", target_env
= "sgx")
63 #[cfg(target_os = "hermit")]
64 #[path = "hermit/mod.rs"]
69 all(target_arch
= "wasm32", not(target_os
= "wasi")),
70 all(target_vendor
= "fortanix", target_env
= "sgx")
73 #[cfg(all(not(target_os = "hermit"), any(unix, doc)))]
80 all(target_arch
= "wasm32", not(target_os
= "wasi")),
81 all(target_vendor
= "fortanix", target_env
= "sgx")
84 #[cfg(any(target_os = "linux", doc))]
91 all(target_arch
= "wasm32", not(target_os
= "wasi")),
92 all(target_vendor
= "fortanix", target_env
= "sgx")
95 #[cfg(any(target_os = "wasi", doc))]
102 all(target_arch
= "wasm32", not(target_os
= "wasi")),
103 all(target_vendor
= "fortanix", target_env
= "sgx")
106 #[cfg(any(windows, doc))]
110 #[cfg(target_os = "android")]
112 #[cfg(target_os = "dragonfly")]
114 #[cfg(target_os = "emscripten")]
116 #[cfg(target_os = "espidf")]
118 #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
119 pub mod fortanix_sgx
;
120 #[cfg(target_os = "freebsd")]
122 #[cfg(target_os = "fuchsia")]
124 #[cfg(target_os = "haiku")]
126 #[cfg(target_os = "horizon")]
128 #[cfg(target_os = "illumos")]
130 #[cfg(target_os = "ios")]
132 #[cfg(target_os = "l4re")]
134 #[cfg(target_os = "macos")]
136 #[cfg(target_os = "netbsd")]
138 #[cfg(target_os = "openbsd")]
140 #[cfg(target_os = "redox")]
142 #[cfg(target_os = "solaris")]
145 #[cfg(target_os = "solid_asp3")]
147 #[cfg(target_os = "vxworks")]
150 #[cfg(any(unix, target_os = "wasi", doc))]