Crate webusb

Source
Expand description

§webusb

Implementation of the WebUSB API specification in Rust.

§Design

The crate is designed to be as close to the WebUSB specification as possible. There are two “backends” available, Native and WASM.

The native backend (libusb) supports parsing webusb descriptors. The wasm backend will make use of the runtime’s WebUSB implementation.

see usbd-webusb for WebUSB compatible firmware for the device.

§Usage

See webusb/examples for usage examples.

Re-exports§

pub use rusb;

Modules§

constants

Structs§

Context
A WebUSB Context. Provides APIs for device enumaration.
UsbAlternateInterface
UsbConfiguration
UsbControlTransferParameters
UsbDevice
Represents a UsbDevice. Only way you can obtain one is through Context::devices https://wicg.github.io/webusb/#device-usage
UsbEndpoint
UsbInterface

Enums§

Direction
Error
UsbEndpointType
UsbRecipient
UsbRequestType

Type Aliases§

Result