oscall 0.0.1

Low-level cross-platform interface to operating system services: files, memory mapping, networking and more, with no libc on Linux
Documentation
//! 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
#![no_std]

#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;

mod macros;

mod error;
mod handle;
mod path;
mod sys;

pub mod event;
pub mod fs;
pub mod io;
pub mod mem;
pub mod net;
pub mod process;
pub mod rand;
pub mod raw;
pub mod sync;
pub mod thread;
pub mod time;

pub use error::{Error, ErrorKind, Result};
pub use handle::{AsHandle, BorrowedHandle, OwnedHandle, RawHandle};
pub use path::AsPath;