[dependencies.bytes]
version = "1.4"
[dependencies.futures]
version = "0.3"
[dependencies.js-sys]
optional = true
version = "0.3"
[dependencies.nusb]
features = ["tokio"]
optional = true
version = "0.2"
[dependencies.tokio]
features = ["macros", "sync", "time"]
version = "1.43"
[dependencies.tracing]
version = "0.1"
[dependencies.usb-gadget]
features = ["tokio"]
optional = true
version = "0.7"
[dependencies.uuid]
version = "1.13"
[dependencies.wasm-bindgen]
optional = true
version = "0.2"
[dependencies.wasm-bindgen-futures]
optional = true
version = "0.4"
[dependencies.web-sys]
features = ["Window", "WorkerGlobalScope"]
version = "0.3"
[dependencies.webusb-web]
optional = true
version = "0.4.1"
[dev-dependencies.rand]
version = "0.9"
[dev-dependencies.rand_xoshiro]
version = "0.7"
[dev-dependencies.tokio]
features = ["time"]
version = "1"
[dev-dependencies.tracing-log]
version = "0.2"
[dev-dependencies.tracing-subscriber]
default-features = false
features = ["env-filter", "fmt"]
version = "0.3"
[[example]]
doc-scrape-examples = true
name = "device"
path = "examples/device.rs"
required-features = ["device"]
[[example]]
doc-scrape-examples = true
name = "host"
path = "examples/host.rs"
required-features = ["host"]
[features]
default = []
device = ["dep:usb-gadget", "tokio/rt"]
host = ["dep:nusb", "tokio/rt"]
trace-packets = []
web = ["dep:js-sys", "dep:webusb-web", "dep:wasm-bindgen", "dep:wasm-bindgen-futures"]
[lib]
name = "upc"
path = "src/lib.rs"
[package]
authors = ["Sebastian Urban <surban@surban.net>"]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = false
categories = ["hardware-support", "asynchronous"]
description = "USB packet channel (UPC): provides a reliable, packet-based transport over USB."
edition = "2021"
keywords = ["usb", "gadget", "packet", "channel"]
license = "Apache-2.0"
name = "upc"
readme = "README.md"
repository = "https://github.com/surban/upc"
rust-version = "1.85"
version = "0.8.1"
[package.metadata.docs.rs]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
features = ["host", "device"]
rustc-args = ["--cfg", "web_sys_unstable_apis"]
rustdoc-args = ["--cfg", "docsrs", "--cfg", "web_sys_unstable_apis"]
[target.'cfg(target_arch = "wasm32")'.dev-dependencies.getrandom]
features = ["wasm_js"]
version = "0.3"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen-test]
version = "0.3"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies.web-sys]
features = ["console", "Document", "HtmlElement"]
version = "0.3"
[[test]]
name = "web"
path = "tests/web.rs"