webusb-web

Crates.iowebusb-web
lib.rswebusb-web
version
sourcesrc
created_at2025-02-07 18:20:09.649994+00
updated_at2025-03-03 22:52:33.349331+00
descriptionWebUSB on the web 🕸️ — Access USB devices from the web browser.
homepage
repositoryhttps://github.com/surban/webusb-web
max_upload_size
id1547284
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Sebastian Urban (surban)

documentation

README

webusb-web — WebUSB on the web 🕸️

This crate provides WebUSB support in a JavaScript runtime environment, usually a web browser. It allows you to communicate with connected USB devices from a web browser.

The WebUSB API provides a way to expose non-standard Universal Serial Bus (USB) compatible devices services to the web, to make USB safer and easier to use.

This crate provides Rust support for using WebUSB when targeting WebAssembly.

MDN provides a WebUSB overview while detailed information is available in the WebUSB specification.

crates.io page docs.rs page Apache 2 license

Building

This crate depends on unstable features of the web_sys crate. Therefore you must add --cfg=web_sys_unstable_apis to the Rust compiler flags.

One way of doing this is to create the file .cargo/config.toml in your project with the following contents:

[build]
target = "wasm32-unknown-unknown"
rustflags = ["--cfg=web_sys_unstable_apis"]

License

webusb-web is licensed under the Apache 2.0 license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in webusb-web by you, shall be licensed as Apache 2.0, without any additional terms or conditions.

Commit count: 16

cargo fmt