libv4l-rs icon indicating copy to clipboard operation
libv4l-rs copied to clipboard

device: Use `OwnedFd` type and bump MSRV to 1.66

Open MarijnS95 opened this issue 2 years ago • 4 comments

The first new commit 22a2365 on next switches to the RawFd type from the std::os::fd module which is only available since Rust 1.66. This module also provides an OwnedFd type which already has a close() call in the Drop implementation, and implements the desired AsRawFd (and AsFd and IntoRawFd) traits.

Note that these types were already stabilized in Rust 1.63 under std::os::unix::io, which is now merely a reexport of std::os::fd.

This also replaces the forgotten .fd() calls with .as_raw_fd() from from commit 17c2871.

MarijnS95 avatar Sep 06 '23 21:09 MarijnS95

@raymanfx should I target this to main? It looks like next currently isn't really in a ready state, as for example 384e7fbed429e83613edd4a630573240ec782607 uses v4l2_sys unconditionally which fails the --no-default-features test. I assume next is your personal test ground rather than a branch you expect folks to send their contributions to?

MarijnS95 avatar Sep 07 '23 10:09 MarijnS95

@raymanfx ping?

MarijnS95 avatar Oct 11 '23 15:10 MarijnS95

Hi guys, sorry for being MIA. I've been working on other projects and there's only so many hours in a day. I definately want to return to working on this crate and finish the overhaul of the I/O memory API.

@MarijnS95 as you have been involved for quite a bit now, what do you think about taking over maintainership of this crate temporarily? I'm still available for reviews, but don't feel like I can dedicate enough time to API changes / architecture right now.

raymanfx avatar Oct 11 '23 16:10 raymanfx

@raymanfx I figured you'd ask; same problems for me, there's only so much time in a day. And I'm not even using this crate yet, that's still on a soon™ project list somewhere™.

That said I do somehow have a sweet-spot for low-level (typically kernel/OS related) binding crates (ndk, ash, windows-rs, drm-rs, probably forgot a few more), all the way from expressive APIs to complete Rust'y documentation. I'd gladly be more involved!

On that note, there's still an unfinished Media API in one of my branches :)

MarijnS95 avatar Oct 11 '23 17:10 MarijnS95