A Linux io_uring
API, using rustix
This is a Linux io_uring
userspace
interface for Rust. It is higher-level than the userspace boundary API, but
lower-level than an async runtime.
This library derived from the
io_uring
crate, and is modified to
use rustix
to perform the
system calls.
Usage
To use the rustix-uring
crate, first add this to your Cargo.toml
:
[]
= "0.4"
Next we can start using the rustix-uring
crate.
The following is quick introduction using Read
for file.
use ;
use AsRawFd;
use ;
Note that opcode Read
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.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
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.