oscall 0.0.2

Low-level cross-platform interface to operating system services: files, memory mapping, networking and more, with no libc on Linux
Documentation
# oscall

[![CI](https://github.com/KarpelesLab/oscall/actions/workflows/ci.yml/badge.svg)](https://github.com/KarpelesLab/oscall/actions/workflows/ci.yml)
[![crates.io](https://img.shields.io/crates/v/oscall.svg)](https://crates.io/crates/oscall)
[![docs.rs](https://img.shields.io/docsrs/oscall)](https://docs.rs/oscall)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

A low-level, cross-platform interface to operating system services: files,
memory mapping, networking, time, processes and more.

oscall talks to the operating system directly and has **no dependencies**:

| OS | Backend | Architectures |
|---|---|---|
| Linux | raw system calls, no libc | x86_64, x86, aarch64, arm, riscv64, riscv32 |
| [fullrust]https://github.com/KarpelesLab/fullrust | the same raw system calls | x86_64, x86, aarch64, armv7 |
| macOS | `libSystem` | x86_64, aarch64 |
| Windows | `kernel32`, `ntdll`, `ws2_32` | x86_64, x86, aarch64 |
| WebAssembly | WASI preview 1 | wasm32 |

It is `no_std`; the default `std` feature only adds conversions to and from
`std` types.

## What it covers

| Module | |
|---|---|
| `mem` | page size, anonymous and file mappings, protection, reservations |
| `io` | read/write on any handle, positional and vectored, pipes, standard handles |
| `fs` | files, metadata, directories, links, locks, copy, directory-relative operations |
| `time`, `rand` | clocks, sleep, the system random generator |
| `sync`, `thread` | wait/wake on an address; the current thread |
| `net` | sockets: IPv4, IPv6, Unix-domain; options; interfaces |
| `event` | `poll`, and a `Poller` over epoll, kqueue or an I/O completion port: sockets, timers, signals, child processes |
| `process` | spawning children, wait, kill, termination requests |

Every function behaves the same on every system; what one system alone has is
in an extension module named after it (`fs::unix`, `net::linux`, ...). On
WebAssembly, what WASI lacks fails with `ErrorKind::Unsupported`.

```rust
use oscall::{fs, io};

let options = fs::OpenOptions::new().write(true).create(true);
let file = fs::open("hello.txt", &options)?;
io::write(&file, b"hello\n")?;
```

The API is not stable yet (0.0.x). The design is in
[docs/plan.md](docs/plan.md), the internals in
[docs/internals.md](docs/internals.md).

## License

MIT