Hacker News new | ask | show | jobs
by 0x457 601 days ago
> But its completely possible to implement an io-uring reactor correctly under Rust's async model, this is just a requirement to do so.

I don't get why people say it's incompatible with rust when rust async libraries work IOCP, which follows the similar model as io-uring?

1 comments

To be fair, I’m not sure if there exists any zero cost IOCP library.

The main way people use IOCP is via mio via tokio. To make IOCP present a readiness interface mio introduces a data copy. This is because tokio/mio assume you’re deploying to Linux and only developing on windows and so optimize performance for epoll. So it’s reasonable to wonder if a completion based interface can be zero cost.

But the answer is that it can be zero cost, and we’ve known that for half a decade. It requires different APIs from readiness based interfaces, but it’s completely possible without introducing the copy using either a “pass ownership of the buffer” model or “buffered IO” model.

Either way, this is unrelated to the issue this blog post identifies, which is just that some io-uring libraries handle cancellation incorrectly.