Need help with io-uring?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

601 Stars 50 Forks Other 219 Commits 7 Opened issues


The `io_uring` library for Rust

Services available


Need anything else?

Contributors list

Linux IO Uring

github actions crates license license

The low-level

userspace interface for Rust.


To use

crate, first add this to your
io-uring = "0.5"

Next we can start using

crate. The following is quick introduction using
for file.
use io_uring::{opcode, types, IoUring};
use std::os::unix::io::AsRawFd;
use std::{fs, io};

fn main() -> io::Result { let mut ring = IoUring::new(8)?;

let fd = fs::File::open("")?;
let mut buf = vec![0; 1024];

let read_e = opcode::Read::new(types::Fd(fd.as_raw_fd()), buf.as_mut_ptr(), buf.len() as _)

// Note that the developer needs to ensure
// that the entry pushed into submission queue is valid (e.g. fd, buffer).
unsafe {
        .expect("submission queue is full");


let cqe = ring.completion().next().expect("completion queue is empty");

assert_eq!(cqe.user_data(), 0x42);
assert!(cqe.result() >= 0, "read error: {}", cqe.result());



Note that opcode

is only available after kernel 5.6. If you use a kernel lower than 5.6, this example will fail.

Test and Benchmarks

You can run the test and benchmark of the library with the following commands.

$ cargo run --package io-uring-test
$ cargo bench --package io-uring-bench


This project is licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or
  • MIT license (LICENSE-MIT or

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in io-uring by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.