19 releases
Uses new Rust 2024
| 0.4.2 | Apr 29, 2026 |
|---|---|
| 0.4.1 | Jan 31, 2026 |
| 0.3.1 | Nov 22, 2025 |
| 0.2.2 | Aug 17, 2024 |
| 0.0.0 | Jul 17, 2021 |
#854 in Asynchronous
675KB
13K
SLoC
The A10 I/O library. [^1]
This library is meant as a low-level library safely exposing different OS's abilities to perform non-blocking I/O.
On Linux A10 uses io_uring, which is a completion based API. For the BSD family of OS (FreeBSD, OpenBSD, NetBSD, etc.) and for the Apple family (macOS, iOS, etc.) this uses kqueue, which is a poll based API.
To support both the completion and poll based API most I/O operations need
ownership of the data, e.g. a buffer, so it can delay deallocation if needed.
[^2] The input data can be retrieved again by using the Extract trait.
Additional documentation can be found in the io_uring(7) and kqueue(2)
manuals.
Examples
Examples can be found in the examples directory of the source code.
[^1]: The name A10 comes from the A10 ring road around Amsterdam, which
relates to the ring buffers that io_uring uses in its design.
[^2]: Delaying of the deallocation needs to happen for completion based APIs
where an I/O operation Future is dropped before it's complete -- the
OS will continue to use the resources, which would result in a
use-after-free bug.