[package]
edition = "2021"
rust-version = "1.79"
name = "nusb"
version = "0.2.2"
authors = ["Kevin Mehall <km@kevinmehall.net>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Cross-platform low-level access to USB devices in pure Rust"
readme = "README.md"
keywords = [
"usb",
"hardware",
]
categories = ["hardware-support"]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/kevinmehall/nusb"
[package.metadata.docs.rs]
all-features = true
[features]
smol = [
"dep:blocking",
"dep:futures-io",
]
tokio = ["dep:tokio"]
[lib]
name = "nusb"
path = "src/lib.rs"
[[example]]
name = "bulk"
path = "examples/bulk.rs"
[[example]]
name = "bulk_io"
path = "examples/bulk_io.rs"
[[example]]
name = "bulk_io_smol"
path = "examples/bulk_io_smol.rs"
required-features = ["smol"]
[[example]]
name = "bulk_io_tokio"
path = "examples/bulk_io_tokio.rs"
required-features = ["tokio"]
[[example]]
name = "buses"
path = "examples/buses.rs"
[[example]]
name = "control"
path = "examples/control.rs"
[[example]]
name = "descriptors"
path = "examples/descriptors.rs"
[[example]]
name = "detach"
path = "examples/detach.rs"
[[example]]
name = "detach_claim"
path = "examples/detach_claim.rs"
[[example]]
name = "hotplug"
path = "examples/hotplug.rs"
[[example]]
name = "list"
path = "examples/list.rs"
[[example]]
name = "string_descriptors"
path = "examples/string_descriptors.rs"
[dependencies.futures-core]
version = "0.3.29"
[dependencies.log]
version = "0.4.20"
[dependencies.once_cell]
version = "1.18.0"
[dependencies.slab]
version = "0.4.9"
[dev-dependencies.env_logger]
version = "0.11"
[dev-dependencies.futures-lite]
version = "2.0"
[dev-dependencies.tokio]
version = "1.11"
features = [
"rt",
"macros",
"io-util",
"rt-multi-thread",
]
[target.'cfg(any(target_os="linux", target_os="android"))'.dependencies.linux-raw-sys]
version = ">= 0.11, <= 0.12"
features = ["ioctl"]
[target.'cfg(any(target_os="linux", target_os="android"))'.dependencies.rustix]
version = "1.0.1"
features = [
"fs",
"event",
"net",
"time",
"mm",
]
[target.'cfg(any(target_os="linux", target_os="android", target_os="windows", target_os="macos"))'.dependencies.blocking]
version = "1.6.1"
optional = true
[target.'cfg(any(target_os="linux", target_os="android", target_os="windows", target_os="macos"))'.dependencies.futures-io]
version = "0.3"
optional = true
[target.'cfg(any(target_os="linux", target_os="android", target_os="windows", target_os="macos"))'.dependencies.tokio]
version = "1"
features = ["rt"]
optional = true
[target.'cfg(target_os="macos")'.dependencies.core-foundation]
version = "0.10.1"
[target.'cfg(target_os="macos")'.dependencies.core-foundation-sys]
version = "0.8.4"
[target.'cfg(target_os="macos")'.dependencies.io-kit-sys]
version = "0.5.0"
[target.'cfg(target_os="windows")'.dependencies.windows-sys]
version = ">= 0.60, <= 0.61"
features = [
"Win32_Devices_Usb",
"Win32_Devices_DeviceAndDriverInstallation",
"Win32_Foundation",
"Win32_Devices_Properties",
"Win32_Storage_FileSystem",
"Win32_Security",
"Win32_System_IO",
"Win32_System_Registry",
"Win32_System_Com",
]
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(fuzzing)"]