Completion-based I/O shared across Rust async runtimes
Problem
Rust libraries cannot target io_uring once for all async runtimes: readiness-based I/O traits do not fit completion I/O, so each runtime builds its own API.
Hypothesis
io_uring support in Rust is fragmented across Tokio experiments, Monoio, Glommio and compio, because readiness-based traits do not fit completion I/O; a shared buffer-ownership layer could let libraries support all of them.
Possible deliverable
A runtime-agnostic crate for owned-buffer I/O traits plus adapters, or upstream contributions to Tokio's io_uring work.
Only worth building if the evidence holds up. Check what still needs validating first.
Evidence
Existing solutions
- Tokiopartial
io_uring support has been discussed since 2020 (#2411) and file I/O support is requested separately (#7266).
- Monoiopartial
A completion-based runtime with its own owned-buffer API.
- Glommiopartial
A thread-per-core io_uring runtime with its own API.
- compiopartial
A completion-based runtime with its own API.
Attached signals
84 reactions and 46 comments on an open issue in tokio-rs/tokio.
- “fails einval” in open issues of 3 projects
Zephyr, compio, gVisor
3 evidence items
- posix: timer: timer_create fails with EINVAL when evp is NULL and lacks clockid validation · zephyrproject-rtos/zephyr
- bug(driver, polling): writing to stdout fails with EINVAL when stdout is /dev/null · compio-rs/compio
- setsockopt(SOL_UDP, UDP_SEGMENT) succeeds but sendmsg with a UDP_SEGMENT cmsg fails with EINVAL · google/gvisor
Still needs validating
- Would contributing to Tokio's in-progress io_uring runtime be more valuable than a new crate?