hannobraun / inotify-rs

Idiomatic inotify wrapper for the Rust programming language
ISC License
261 stars 65 forks source link

Implement `AsFd` and bidirectional conversion to/from `OwnedFd` #202

Closed joshtriplett closed 1 year ago

joshtriplett commented 1 year ago

In particular, this makes it possible to get a BorrowedFd from an Inotify, which allows integration with polling mechanisms that don't use RawFd. This will be needed to work with the next version of async-io.

hannobraun commented 1 year ago

Thank you for the pull request, @joshtriplett! This looks good, but CI fails because our MSRV is too low. I've opened #203.

I'll probably find some time to address this soon, but if anyone's reading this while I still haven't, feel free to jump in with a pull request! This PR is blocked until then.

This will be needed to work with the next version of async-io.

I assume this means you need me to publish a new release, once this is merged?

joshtriplett commented 1 year ago

@hannobraun Right, this PR itself will raise the MSRV as well, for AsFd/BorrowedFd/OwnedFd.

joshtriplett commented 1 year ago

@hannobraun I've updated this to also fix the MSRV and CI. 1.63, which has the I/O Safety types stabilized, will ship in the Debian stable release shipping in a few days.

And yes, I'd really appreciate a release with this change, once merged.

hannobraun commented 1 year ago

Thank you, @joshtriplett! It would have been a bit nicer go have the MSRV bump in a separate pull request, so I don't get confused later when writing the changelog. But this works too!

And yes, I'd really appreciate a release with this change, once merged.

Understood. I'll try to get it out today.

hannobraun commented 1 year ago

New version is out: https://github.com/hannobraun/inotify-rs/pull/204, https://crates.io/crates/inotify/0.10.1

joshtriplett commented 1 year ago

@hannobraun Thank you!