7 unstable releases

0.3.3 Sep 26, 2020
0.3.2 Sep 25, 2020
0.2.0 Dec 10, 2019
0.1.0 Nov 8, 2019
0.0.0-ringbahn.1 May 27, 2020

#1081 in Asynchronous

Download history 2053/week @ 2024-03-14 1754/week @ 2024-03-21 2076/week @ 2024-03-28 1457/week @ 2024-04-04 2563/week @ 2024-04-11 2631/week @ 2024-04-18 2412/week @ 2024-04-25 1835/week @ 2024-05-02 1673/week @ 2024-05-09 2655/week @ 2024-05-16 2474/week @ 2024-05-23 2438/week @ 2024-05-30 1714/week @ 2024-06-06 2931/week @ 2024-06-13 2843/week @ 2024-06-20 2007/week @ 2024-06-27

9,784 downloads per month
Used in 3 crates

MIT/Apache

80KB
1.5K SLoC

Interface to Linux's io_uring interface

iou is a wrapper around the liburing library, which provides a high level interface to Linux's new io_uring interface. It is intended to be extensible and flexible for any use case of io_uring, while still resolving many of the basic safety issues on users' behalf.

The primary API of iou is the IoUring type and its components, the SubmissionQueue, CompletionQueue and Registrar. This provides a Rust-like and high level API that manages the io_uring for you.

Safety

Most of the APIs in iou are safe, and many of the safety issues in using io_uring are completely resolved. In particular, the liburing library which iou is based on correctly implements the atomics necessary to coordinate with the kernel across the io_uring interface. However, some key interfaces remain unsafe. In particular, preparing IO events to be submitted to the io_uring is not safe: users must ensure that the buffers and file descriptors are regarded as borrowed during the lifetime of the IO.

Kernel support

In order to use io_uring, the machine you are running your code on must have a kernel which supports that interface. The first version of io_uring was added in Linux 5.1, but it did not include all of the features supported by this library. Some features of this library may not work depending on which version of Linux you are using.

Dependencies

~2MB
~49K SLoC