-
Notifications
You must be signed in to change notification settings - Fork 4
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
WIP: open_at #21
WIP: open_at #21
Conversation
3c35b37
to
de382f5
Compare
What about doing a pull request to tokio-uring, explaining our use case? |
…okio-uring` For [`open_at` support](#21) we need an `OpenOptions` struct. Sadly we can't re-use the one from `tokio-uring` because it doesn't have a public API for the conversion of OpenOptions into the relevant libc flags. We created [a PR asking for such an API](neondatabase/tokio-uring#1), but, in the meantime, let's unblock ourselves by vendoring the pieces of `tokio-uring` that we need, and cusotmize them as needed. The files that reproduce the `tokio-uring` LICENSE text at the top are copied from `tokio-uring.git:d5e90539bd6d1c518e848298564a098c300866bc`. Files without it were written by myself.
For [`open_at` support](#21) we need an `OpenOptions` struct. Sadly we can't re-use the one from `tokio-uring` because it doesn't have a public API for the conversion of OpenOptions into the relevant libc flags. We created [a PR asking for such an API](neondatabase/tokio-uring#1), but, in the meantime, let's unblock ourselves by vendoring the pieces of `tokio-uring` that we need, and cusotmize them as needed. This PR starts that effort by vendoring the `IoBuf`/`IoBufMut` traits. `OpenOptions` will follow in a later PR. The files that reproduce the `tokio-uring` LICENSE text at the top are copied from `tokio-uring.git:d5e90539bd6d1c518e848298564a098c300866bc`. Files without it were written by myself.
For [`open_at` support](#21) we need an `OpenOptions` struct. Sadly we can't re-use the one from `tokio-uring` because it doesn't have a public API for the conversion of OpenOptions into the relevant libc flags. We created [a PR asking for such an API](neondatabase/tokio-uring#1), but, in the meantime, let's unblock ourselves by vendoring the pieces of `tokio-uring` that we need, and cusotmize them as needed. This PR starts that effort by vendoring the `IoBuf`/`IoBufMut` traits. `OpenOptions` will follow in a later PR. The files that reproduce the `tokio-uring` LICENSE text at the top are copied from `tokio-uring.git:d5e90539bd6d1c518e848298564a098c300866bc`. Files without it were written by myself.
I prototyped the idea to PR against However I think it would still be awkward to use their Hence I took the approach of vendoring in all |
For [`open_at` support](#21) we need an `OpenOptions` struct. Sadly we can't re-use the one from `tokio-uring` because it doesn't have a public API for the conversion of OpenOptions into the relevant libc flags. We created [a PR asking for such an API](neondatabase/tokio-uring#1), but, in the meantime, let's unblock ourselves by vendoring the pieces of `tokio-uring` that we need, and cusotmize them as needed. This PR starts that effort by vendoring the `IoBuf`/`IoBufMut` traits. `OpenOptions` will follow in a later PR. The files that reproduce the `tokio-uring` LICENSE text at the top are copied from `tokio-uring.git:d5e90539bd6d1c518e848298564a098c300866bc`. Files without it were written by myself.
For [`open_at` support](#21) we need an `OpenOptions` struct. Sadly we can't re-use the one from `tokio-uring` because it doesn't have a public API for the conversion of OpenOptions into the relevant libc flags. We created [a PR asking for such an API](neondatabase/tokio-uring#1), but, in the meantime, let's unblock ourselves by vendoring the pieces of `tokio-uring` that we need, and cusotmize them as needed. This PR starts that effort by vendoring the `IoBuf`/`IoBufMut` traits. `OpenOptions` will follow in a later PR. The files that reproduce the `tokio-uring` LICENSE text at the top are copied from `tokio-uring.git:d5e90539bd6d1c518e848298564a098c300866bc`. Files without it were written by myself.
In the draft PR for [`open_at` support](#21) we need an `OpenOptions` struct. Sadly we can't re-use the one from `tokio-uring` because it doesn't have a public API for the conversion of OpenOptions into the relevant libc flags. We created [a PR asking for such an API](neondatabase/tokio-uring#1), but, in the meantime, let's unblock ourselves by vendoring the pieces of `tokio-uring` that we need, and cusotmize them as needed. This PR starts that effort by vendoring the `IoBuf`/`IoBufMut` traits as well as `tokio-uring`'s approach to support slice-like operations. Support for `OpenOptions` will follow as part of [the PR that adds `open_at` support on top of this PR](#25). The files that reproduce the `tokio-uring` LICENSE text at the top are copied from `tokio-uring.git:d5e90539bd6d1c518e848298564a098c300866bc`. Files without it were written by myself. To make `cargo test` pass, I had to remove the examples in the doc comments.
(Stacked atop #24) * Vendor in `OpenOptions` from `tokio-uring.git:d5e90539bd6d1c518e848298564a098c300866bc` * Remove the `OpenOptions::open()` function which is `tokio-uring`-specific * Remove examples because they mention `tokio_uring` and hence fail `cargo test` * Add the extension trait that allows for conversion of OpenOptions into an `io_uring::squeue::Entry` * Use it throughout the code base. This PR obsoletes #21
Obsoleted by #25 |
Can't merge this as because it copies the OpenOptions code from
tokio-uring
.Maybe just fork
tokio-uring
and make pub the APIs we need?