]> git.proxmox.com Git - rustc.git/blame - library/std/src/os/mod.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / library / std / src / os / mod.rs
CommitLineData
54a0048b 1//! OS-specific functionality.
1a4d82fc 2
c34b1796 3#![stable(feature = "os", since = "1.0.0")]
b7449926 4#![allow(missing_docs, nonstandard_style, missing_debug_implementations)]
223e47cc 5
6a06907d
XL
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
9// documentation.
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
ff7c6d11 12
6a06907d
XL
13#[cfg(doc)]
14#[stable(feature = "rust1", since = "1.0.0")]
15pub use crate::sys::unix_ext as unix;
ff7c6d11 16
6a06907d
XL
17#[cfg(doc)]
18#[stable(feature = "rust1", since = "1.0.0")]
19pub use crate::sys::windows_ext as windows;
ff7c6d11 20
6a06907d
XL
21#[cfg(doc)]
22#[doc(cfg(target_os = "linux"))]
23pub mod linux;
ff7c6d11 24
6a06907d
XL
25#[cfg(doc)]
26#[stable(feature = "wasi_ext_doc", since = "1.35.0")]
27pub use crate::sys::wasi_ext as wasi;
ff7c6d11 28
6a06907d 29// If we're not documenting libstd then we just expose the main modules as we otherwise would.
ff7c6d11 30
6a06907d
XL
31#[cfg(not(doc))]
32#[cfg(any(unix, target_os = "hermit"))]
33#[stable(feature = "rust1", since = "1.0.0")]
34pub use crate::sys::ext as unix;
ff7c6d11 35
6a06907d
XL
36#[cfg(not(doc))]
37#[cfg(windows)]
38#[stable(feature = "rust1", since = "1.0.0")]
39pub use crate::sys::ext as windows;
ff7c6d11 40
6a06907d
XL
41#[cfg(not(doc))]
42#[cfg(any(target_os = "linux", target_os = "l4re"))]
43pub mod linux;
ff7c6d11 44
6a06907d
XL
45#[cfg(not(doc))]
46#[cfg(target_os = "wasi")]
47pub mod wasi;
d9579d0f 48
60c5eb7d
XL
49#[cfg(target_os = "android")]
50pub mod android;
51#[cfg(target_os = "dragonfly")]
52pub mod dragonfly;
53#[cfg(target_os = "emscripten")]
54pub mod emscripten;
55#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
56pub mod fortanix_sgx;
57#[cfg(target_os = "freebsd")]
58pub mod freebsd;
59#[cfg(target_os = "fuchsia")]
60pub mod fuchsia;
61#[cfg(target_os = "haiku")]
62pub mod haiku;
ba9703b0
XL
63#[cfg(target_os = "illumos")]
64pub mod illumos;
60c5eb7d
XL
65#[cfg(target_os = "ios")]
66pub mod ios;
67#[cfg(target_os = "macos")]
68pub mod macos;
69#[cfg(target_os = "netbsd")]
70pub mod netbsd;
71#[cfg(target_os = "openbsd")]
72pub mod openbsd;
73#[cfg(target_os = "redox")]
74pub mod redox;
75#[cfg(target_os = "solaris")]
76pub mod solaris;
77#[cfg(target_os = "vxworks")]
78pub mod vxworks;
0731742a 79
d9579d0f 80pub mod raw;