1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Low-level cross-platform interface to operating system services.
//!
//! `oscall` talks to the operating system directly, with no dependencies:
//!
//! - **Linux** (and [fullrust]): raw system calls, no libc involved.
//! - **macOS**: `libSystem`, the only stable interface to the kernel.
//! - **Windows**: `kernel32`, `ntdll` and `ws2_32`.
//! - **WebAssembly**: WASI preview 1 imports; without WASI, the calls that
//! need a system fail with [`ErrorKind::Unsupported`].
//!
//! Every function maps onto one operating system operation, or onto the few
//! needed to give the same result everywhere. There is no buffering, no
//! global state and no hidden allocation.
//!
//! The modules are portable: a function does the same thing on every system,
//! and what one system alone offers is in a sub-module named after it
//! (`mem::linux`, `fs::unix`...). For what oscall does not cover, [`raw`]
//! gives the layer underneath, which is specific to each system and
//! `unsafe`: the system call itself on Linux, and the error conventions and
//! string conversions the system libraries need elsewhere.
//!
//! [fullrust]: https://github.com/KarpelesLab/fullrust
extern crate alloc;
extern crate std;
pub use ;
pub use ;
pub use AsPath;