]> git.lizzy.rs Git - rust.git/blob - src/libstd/os/mod.rs
Add `std::os::fortanix_sgx` module
[rust.git] / src / libstd / os / mod.rs
1 // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 //! OS-specific functionality.
12
13 #![stable(feature = "os", since = "1.0.0")]
14 #![allow(missing_docs, nonstandard_style, missing_debug_implementations)]
15
16 cfg_if! {
17     if #[cfg(rustdoc)] {
18
19         // When documenting libstd we want to show unix/windows/linux modules as
20         // these are the "main modules" that are used across platforms. This
21         // should help show platform-specific functionality in a hopefully
22         // cross-platform way in the documentation
23
24         #[stable(feature = "rust1", since = "1.0.0")]
25         pub use sys::unix_ext as unix;
26
27         #[stable(feature = "rust1", since = "1.0.0")]
28         pub use sys::windows_ext as windows;
29
30         #[doc(cfg(target_os = "linux"))]
31         pub mod linux;
32     } else {
33
34         // If we're not documenting libstd then we just expose the main modules
35         // as we otherwise would.
36
37         #[cfg(any(target_os = "redox", unix))]
38         #[stable(feature = "rust1", since = "1.0.0")]
39         pub use sys::ext as unix;
40
41         #[cfg(windows)]
42         #[stable(feature = "rust1", since = "1.0.0")]
43         pub use sys::ext as windows;
44
45         #[cfg(any(target_os = "linux", target_os = "l4re"))]
46         pub mod linux;
47
48     }
49 }
50
51 #[cfg(target_os = "android")]    pub mod android;
52 #[cfg(target_os = "bitrig")]     pub mod bitrig;
53 #[cfg(target_os = "dragonfly")]  pub mod dragonfly;
54 #[cfg(target_os = "freebsd")]    pub mod freebsd;
55 #[cfg(target_os = "haiku")]      pub mod haiku;
56 #[cfg(target_os = "ios")]        pub mod ios;
57 #[cfg(target_os = "macos")]      pub mod macos;
58 #[cfg(target_os = "netbsd")]     pub mod netbsd;
59 #[cfg(target_os = "openbsd")]    pub mod openbsd;
60 #[cfg(target_os = "solaris")]    pub mod solaris;
61 #[cfg(target_os = "emscripten")] pub mod emscripten;
62 #[cfg(target_os = "fuchsia")]    pub mod fuchsia;
63 #[cfg(target_os = "hermit")]     pub mod hermit;
64 #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] pub mod fortanix_sgx;
65
66 pub mod raw;