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

Upgrade from uring-sys to uring-sys2 #68

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

neithernut
Copy link

At this time, uring-sys did not receive any updates in three and a half years. Open PRs seemingly never got merged, including one PR supplying a fix enabling uring-sys being built on musl-systems. For now, we have to assume it's abandoned.

Luckily, a drop-in replacement which still receives updates and fixes exists in the form of uring-sys2, a fork of uring-sys. This PR switches over to uring-sys2. In addition, it adds SetupFlags and SetupFeatures constants which were introduced with newer versions of liburing.

uring-sys appears to be not actively developed anymore. `uring-sys2` is
a fork which still receives updates and fixes. In particular, it
includes changes which make it build on musl-based systems.

Unlike `uring-sys`, `uring-sys2` relies fully on bindgen. Thus, a few
seemingly hand-written or altered declrations whch were included in the
former are not availible (at least under the same name) in `uring-sys2`.
In particular, `IoRingOp` is named `io_uring_op` in `uring-sys2`. The
constant `LIBURING_UDATA_TIMEOUT` is gone seemingly without a
replacement. We decided to at least produce the same value.

Some fns used to accept `libc::msghdr`, but `uring-sys2` includes its
own version, which unfortunately is a distinct type. We did compare the
definitions and deemed the layout to be identical.

Other than that, the mutability changed in a few places, but we still
could preserve the existing `iou` interface.
... rather than reproducing the values using bitshifts directly. In
addition, used this opportunity to add flags previously missing.

The order of the definitions is ascending significance of the one bit
set. It's the same order used previously and in the io_uring_setup(2)
man page.
... rather than reproducing the values using bitshifts directly. In
addition, used this opportunity to add features previously missing.

The order of the definitions is ascending significance of the one bit
set. It's the same order used previously and in the io_uring_setup(2)
man page.
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.

1 participant