Expand description
nexio — a verified, single-core io_uring runtime.
§Design constraints
-
Owned buffers only. The kernel holds a raw pointer from SQE submission until the matching CQE arrives. Borrowed
&mut [u8]cannot model an external, uncancellable writer. -
Leak-until-real-completion cancellation. Dropping an in-flight op submits a best-effort
ASYNC_CANCELand moves the buffer into the reactor slab. Buffer freed only when the real CQE lands. -
!Sendtasks, one reactor per thread. No work-stealing. Multi-core: N independent reactors + SO_REUSEPORT sharding. -
Verification-first. Pure-Rust layer (slab, Op state machine) targets Miri + Kani. Syscall-adjacent layer targets integration tests at high queue depth.
Re-exports§
pub use blocking::spawn_blocking;pub use executor::block_on;pub use executor::join2;pub use executor::select2;pub use executor::spawn;pub use executor::yield_now;pub use executor::JoinSet;pub use profile::HardwareProfile;pub use reactor::Reactor;
Modules§
- addr
- Asynchronous address resolution.
- blocking
- A thread pool for work that would block the reactor thread.
- buf
- Owned buffer types.
- compat
- Adapters between nexio’s owned-buffer streams and the poll-based I/O traits the
wider ecosystem uses (
tokio::io::AsyncRead/AsyncWrite, and hyper’sRead/Write). - executor
- Single-threaded
!Sendtask executor. - fs
- Asynchronous file I/O backed by
io_uringusing owned buffers. - net
- Networking on top of the nexio reactor.
- process
- Spawning and talking to child processes.
- profile
- Self-adaptive hardware and OS profile.
- reactor
- Thread-local io_uring reactor.
- signal
- Signal handling.
- sync
- Asynchronous synchronization primitives and channels.
- time
- Asynchronous time utilities:
io_uringtimeouts on the io_uring backend, the reactor’s timer map on the portable backend.
Functions§
- io_
uring_ available - Return
trueifio_uringis compiled in and permitted by the kernel/sandbox in the current process. - run_
sharded - Run
factory(i)to completion onthreadsindependent reactors, one OS thread each, and return every result in shard order. - run_
sharded_ auto - Run
factory(i)on one shard per available CPU (respecting Linux cgroup quotas), returning every shard’s result in shard order.