]> git.proxmox.com Git - rustc.git/blob - src/libstd/sys/mod.rs
New upstream version 1.14.0+dfsg1
[rustc.git] / src / libstd / sys / mod.rs
1 // Copyright 2016 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 //! Platform-dependent platform abstraction
12 //!
13 //! The `std::sys` module is the abstracted interface through which
14 //! `std` talks to the underlying operating system. It has different
15 //! implementations for different operating system families, today
16 //! just Unix and Windows.
17 //!
18 //! The centralization of platform-specific code in this module is
19 //! enforced by the "platform abstraction layer" tidy script in
20 //! `tools/tidy/pal.rs`.
21 //!
22 //! This module is closely related to the platform-independent system
23 //! integration code in `std::sys_common`. See that module's
24 //! documentation for details.
25 //!
26 //! In the future it would be desirable for the indepedent
27 //! implementations of this module to be extracted to their own crates
28 //! that `std` can link to, thus enabling their implementation
29 //! out-of-tree via crate replacement. Though due to the complex
30 //! inter-dependencies within `std` that will be a challenging goal to
31 //! achieve.
32
33 pub use self::imp::*;
34
35 #[cfg(unix)]
36 #[path = "unix/mod.rs"]
37 mod imp;
38
39 #[cfg(windows)]
40 #[path = "windows/mod.rs"]
41 mod imp;