ringbahn / iou

Rust interface to io_uring
Apache License 2.0
328 stars 22 forks source link

Draft of iou v0.3.0 #47

Closed withoutboats closed 4 years ago

withoutboats commented 4 years ago

This will be a substantial expansion of the API, with some important breaking changes. There are two main drivers:

  1. Adjusting iou to better suite the needs discovered from ringbahn and other experiences. This includes the ability to request a contiguous block of SQEs greater than 1 SQE, as well as other changes like copying the data out for the CQE instead of making it a pointer.
  2. Expand iou's API with all of the new features of io-uring in the past year. This mainly means a lot more kinds of ops can be prepped, but also additions to set up and new register ops as well.
withoutboats commented 4 years ago

@mxxo FYI I ended up making some changes to the ringfd/registeredfd system in this branch:

  1. I made RingFd a trait instead of an enum. This makes the code cleaner and probably easier to optimize.
  2. Placeholders no longer panic when you use them; using them should cause the event to resolve to an io::Error, this is better than panicking because users can choose to recover from it.
  3. I made RegisteredFd hold the RawFd as well as the index, since that just makes it an 8 byte struct which should be fine for everyone.