Closed jordanisaacs closed 1 year ago
I would reject it.
This introduced a huge dependency and I didn't see any (real) benefits.
Understandable. I already am using rustix & no_std/no libc so this helps unify a lot of my dependencies and types. For those who are interested in this, I have a new library rustix-uring that I will publish to cargo once rustix releases a new version that contains all the necessary io_uring
types. For now you can point to it with a git dependency.
You may want the rustix port:
Otherwise stick with this one as It does pull in a huge dependency, and is very much a breaking change for your existing code.
Let me explain a little bit why I don't think this is of real benefit to the io_uring
crate.
no_std
support, it can be done in this crate, just use own error type instead of io::Error
. but I don't currently see anyone want it.rustix
is a beautiful project, and it's the most mature libc-free standard library out there. I want rustix
to be successful, but at this time, I don't think it's a good fit for io_uring
crate. Especially I use io_uring
in production and don't want any surprises.
Thanks for explaining your reasoning! That makes a ton of sense.
I marked this as a draft because it could do with some code cleanup, but it works and runs the tests (almost successfully, see below). Also requires rustix to point to git until some missing io_uring types are merged & a new release is tagged.
Breaking changes: The API is the same except for function parameter types. It uses
rustix
types, and re-exports them out. Flags are now strongly typed. Another big user facing type change isuser_data
which uses io_uring_user_data for keeping pointer provenance.Rustix, bindgen, and new operations: All the bindgen files and syscalls are removed. Bindgen is done through linux-raw-sys which is used by rustix. So updating would involve updating
linux-raw-sys
, then creating the type wrappers inrustix
, and then exposing the operation inio-uring
.Why:
io_uring
can now be compiled onno_std
. Still requiresalloc
for probes, but can even remove that dependency if you want to go the mmap route like liburing.Tests: Passes all the tests/examples except for a single socket test with the following config. Every test passed when commenting out the socket fd number assertion. Not sure what is wrong with it: