cyme
cyme copied to clipboard
Replace libusb with pure Rust nusb
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 parsingsystem_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.