cyme icon indicating copy to clipboard operation
cyme copied to clipboard

Replace libusb with pure Rust nusb

Open tuna-f1sh opened this issue 6 months ago • 4 comments

Creates a Profiler trait that provides both libusb and nusb system USB profilers. I've kept 'libusb' as an optional feature for those wishing to keep using that and for exact parity with lsusb; they should both output the same but lsusb uses libusb of course.

  • [x] ~~Since nusb uses IOkit (same as system_profiler command), use this for all macOS profiling by default instead of parsing system_profiler or at least default merge if different - bus names seem to be missing.~~ left this as a TODO one day.
  • [x] Refactor repeat code in the profilers so that the different args (device, handle etc) are contained within the profiler struct and they can be universal.
  • [ ] Wait for release with https://github.com/kevinmehall/nusb/pull/71 to not have [patch.io] in Crate.toml.
  • [x] Update/add missing documentation.
  • [x] Move profilers into separate backend files.

Closes #17.

tuna-f1sh avatar Aug 07 '24 14:08 tuna-f1sh