Registry / networking / libusb

libusb

JSON →
library0.3.0rscratesunverified

Rust library for accessing USB devices via libusb.

# Cargo.toml [dependencies] libusb = "0.3.0"
INSTALL
IMPORT
SIG · LIBUSB
L
libusb
networkingrustv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Context
✓ use libusb::Context;

Initialize libusb and list connected USB devices.

use libusb::Context; fn main() -> Result<(), Box<dyn std::error::Error>> { let context = Context::new()?; for device in context.devices()?.iter() { println!("Device: {:?}", device.device_descriptor()?); } Ok(()) }
Debug
Known issues
gotchaRequires libusb system library to be installed.
fix
Install libusb via your package manager (e.g., `apt install libusb-1.0-0-dev`).
affects: *
Upgrade
Version history
0.3.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources