A Rust USB library which works on both native and WASM targets
Find a file
2024-03-23 20:14:48 -05:00
.cargo Fixed made native get_device() properly grab the first one 2024-02-18 03:14:55 -06:00
.github/workflows Create rust.yml 2024-03-10 16:55:34 -05:00
src Added UsbDescriptor, added get_device_list() on native, updated deps 2024-03-23 20:14:48 -05:00
.gitignore Fixed documentation errors 2024-02-08 03:04:49 -06:00
Cargo.toml Fixed typo, v0.2.3 2024-03-10 16:58:57 -05:00
LICENSE Create LICENSE 2024-02-05 03:45:26 -06:00
README.md Update README.md 2024-03-01 08:48:45 -06:00

Cross USB

A USB library which works seamlessly across most native and WASM targets.

Crates.io

Documentation


Note

Web USB only works in Chromium based browsers for now.

Dependencies

For native USB, the crate utilizies nusb, a pure rust library similar to the very popular libusb.

For WASM, this crate utilizes web-sys which gives access to browser API calls, and in this case is used to interact with WebUSB

TODO

  • Add choice for native backend between libusb wrapper and pure rust nusb
  • Allow platform-specific operations if the user requires them
  • Hot plug support... requires either using libusb as an optional backend or for nusb to implement it