IIRC, io-uring makes it very complex to expose a safe zero-overhead async interface, because the kernel expects any buffers that you pass it to live until the operation completes (ie, you can’t allocate your own buffer, give it to the kernel, then decide you are uninterested and throw away your buffer). In Rust, this would mean that any buffer basically needs to be 'static.
It should be possible to create a an API that uses an intermediate, managed pool of buffers to pass to the kernel, but this would imply extra copies.
AIUI, withoutboats has described this issue in depth in https://without.boats/blog/io-uring/ and follow-on blog posts, which also go into the design of ringbahn itself.
Re:Choosing a Rust web framework
by steveklabnik on Sunday July 05, 2020 @03:05PM
(#23741041)
withoutboats has been writing a lot about these various issues while building ringbahn https://without.boats/blog/
Warp seems to have one of the better api experiences but has significant performance issues.
In the async world I think
https://github.com/stjepang/smol
is going to have a pretty big positive impact on the useability of the whole system so I wouldn't rush to go all in on either async-std or tokio just yet. Last I read it was still having some fairness issues that were next to fix though.
There is also
https://github.com/withoutboats/ringbahn
Which is very disruptive in that io-uring doesn't have a natural async interface?