Unix API
This crate contains safe wrappers around Unix APIs.
A target is supported if and only if the crate is tested against it via CI.
The following targets are supported:
This crate contains little architecture-specific code. Therefore, other
architectures (arm, aarch64, etc.) will probably also work.
This crate fully supports reading into uninitialized buffers but the API will
most likely change when the same functionality becomes stable in libstd.
This crate builds on the libc crate and uses its declarations of the raw OS APIs
if possible. This crate considers itself to be the next step up from libc: It
safely wraps the raw OS functions but does little beyond that. Integer
parameters are still integer parameters, functions operating on sockets accept
the socket file descriptor as a raw integer, there is no socket wrapper type,
etc.
At the same time, this crate provides the necessary tools to make it as easy to
use from Rust as the raw APIs are to use from C. For example, all of the
following just work:
open("./file", c::O_RDWR, 0);
open(b"./file", c::O_RDWR, 0);
open(CStr::from_ptr(p), c::O_RDWR, 0);
open(Path::new("./file"), c::O_RDWR, 0);
See the crate documentation for more details.
[u8]
. uapi I/O works on [MaybeUninit<u8>]
.This project is licensed under either of
at your option.