| 1 | nusb |
| 2 | ---- |
| 3 | |
| 4 | A new pure-Rust library for cross-platform low-level access to USB devices. |
| 5 | |
| 6 | [Documentation](https://docs.rs/nusb) |
| 7 | |
| 8 | ### Compared to [rusb](https://docs.rs/rusb/latest/rusb/) and [libusb](https://libusb.info/) |
| 9 | |
| 10 | * Pure Rust, no dependency on libusb or any other C library. |
| 11 | * Async-first, while not requiring an async runtime like `tokio` or |
| 12 | `async-std`. Still easily supports blocking with |
| 13 | `futures_lite::block_on`. |
| 14 | * No context object. You just open a device. There is a global event loop thread |
| 15 | that is started when opening the first device. |
| 16 | * Thinner layer over OS APIs, with less internal state. |
| 17 | |
| 18 | ### Current status |
| 19 | |
| 20 | * Support for Linux, Windows, macOS, and Android |
| 21 | * Device listing and descriptor parsing |
| 22 | * Transfers on control, bulk and interrupt endpoints |
| 23 | * Device connect / disconnect events on all platforms |
| 24 | * Used by [probe-rs](https://github.com/probe-rs/probe-rs), |
| 25 | [packetry](https://packetry.readthedocs.io/en/latest/), |
| 26 | [postcard-rpc](https://github.com/jamesmunns/postcard-rpc) |
| 27 | and others, but still relatively new. Please test with your device and report issues. |
| 28 | |
| 29 | ### License |
| 30 | MIT or Apache 2.0, at your option |