Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from io_uring to rustix_uring for broad compatibility #319

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gelbpunkt
Copy link

@Gelbpunkt Gelbpunkt commented Dec 14, 2024

rustix wraps syscalls without the libc crate, which does not expose a bunch of io-uring related APIs such as statx on musl targets.

With these changes, tokio-uring compiles fine when built for musl targets.

TODO: test and split the minvers fixes + maybe split the change for the listen syscall into their own commits, update docs, update tests

rustix wraps syscalls without the libc crate, which does not expose a
bunch of io-uring related APIs such as statx on musl targets.

With these changes, tokio-uring compiles fine when built for musl
targets.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
@ileixe
Copy link

ileixe commented Dec 16, 2024

Just out of curiosity, do you know what's the plan for io-uring crate (Do rustix replace it)? Looks like maintainer is same.

@Gelbpunkt
Copy link
Author

Just out of curiosity, do you know what's the plan for io-uring crate (Do rustix replace it)? Looks like maintainer is same.

The maintainers aren't the same from what I can see, rustix-uring is a fork of the io-uring crate. I'm not involved with the project so I don't know more than that.

@ileixe
Copy link

ileixe commented Dec 16, 2024

Oh I did not aware it's fork of io-uring (so I saw same maintainer in github contributor view)

Anyway, here's the reason from io-uring side:
tokio-rs/io-uring#207

I think it makes sense.

@quininer
Copy link
Member

If you want musl compatibility, there is no need to switch to rustix_uring, just use linux-raw-sys (or any other linux headers library) with io_uring.

like

use io_uring::opcode;
use linux_raw_sys::general::statx;

let statx = Box::new(statx {
    // ...
});
let op = opcode::Statx::new(fd, path, Box::into_raw(statx).cast());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants