l1npengtul/libuvc-rs

Apple M1 support

Closed this issue · 3 comments

I'm creating this issue to track support for Apple M1 silicon machines.

Currently, there are two outstanding issues which need to be solved:

  1. winit = "0.26"
    This will come with the glium "0.29" release which should be released next week.
  2. libusb1-sys needs to be vendored (features = ["vendored"])
    The only "real" package manager for macOS is brew, but it's not fully supported on Apple aarch64 yet. That means there is no "easy" way to get libusbinstalled for libusb1-sys to link against.

The first item is obviously just needed to get the mirror.rs example working, so it's not vital to the library itself. Would you be fine with making libusb1-sys vendored? Maybe we could just enable it automatically when the "vendor" feature is enabled for this crate (uvc).

Hi @raymanfx, and thanks for this issue.

  1. Should this be glutin = "0.26"? I'll keep an eye out for the next release of glium.
  2. The end-user can always include libusb1-sys in their Cargo.toml and specify the vendor feature on libusb1-sys. libuvc should then use the static version of libusb, as feature flags are additive. If you wan't I'd be happy to add a new feature flag (all-vendored?) which could make this less cumbersome. We should be a bit careful when vendoring due to licensing, libusb is GPL. This is one reason for defaulting to system libraries.

winit is the offending component here. I mentioned glium = "0.29" as our target to watch out for, because that will pull in glutin = "0.26" which in turn depends on winit = "0.26" ;)

Speaking of which - glium = "0.29" has been tagged and pushed to crates.io - I'll prepare a PR.

Merged in 41392b7.