60 lines
2 KiB
TOML
60 lines
2 KiB
TOML
[package]
|
|
name = "nusb"
|
|
version = "0.2.2"
|
|
description = "Cross-platform low-level access to USB devices in pure Rust"
|
|
categories = ["hardware-support"]
|
|
keywords = ["usb", "hardware"]
|
|
authors = ["Kevin Mehall <km@kevinmehall.net>"]
|
|
edition = "2021"
|
|
license = "Apache-2.0 OR MIT"
|
|
repository = "https://github.com/kevinmehall/nusb"
|
|
rust-version = "1.79" # keep in sync with .github/workflows/rust.yml
|
|
|
|
[dependencies]
|
|
futures-core = "0.3.29"
|
|
log = "0.4.20"
|
|
once_cell = "1.18.0"
|
|
slab = "0.4.9"
|
|
|
|
[dev-dependencies]
|
|
env_logger = "0.11"
|
|
futures-lite = "2.0"
|
|
tokio = { version = "1.11", features = ["rt", "macros", "io-util", "rt-multi-thread"] }
|
|
|
|
[target.'cfg(any(target_os="linux", target_os="android"))'.dependencies]
|
|
rustix = { version = "1.0.1", features = ["fs", "event", "net", "time", "mm"] }
|
|
linux-raw-sys = { version = ">= 0.11, <= 0.12", features = ["ioctl"] }
|
|
|
|
[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"] }
|
|
|
|
[target.'cfg(target_os="macos")'.dependencies]
|
|
core-foundation = "0.10.1"
|
|
core-foundation-sys = "0.8.4"
|
|
io-kit-sys = "0.5.0"
|
|
|
|
[target.'cfg(any(target_os="linux", target_os="android", target_os="windows", target_os="macos"))'.dependencies]
|
|
blocking = { version = "1.6.1", optional = true }
|
|
tokio = { version = "1", optional = true, features = ["rt"] }
|
|
futures-io = { version = "0.3", optional = true }
|
|
|
|
[features]
|
|
# Use the `blocking` crate for making blocking IO async
|
|
smol = ["dep:blocking", "dep:futures-io"]
|
|
|
|
# Use `tokio`'s IO threadpool for making blocking IO async
|
|
tokio = ["dep:tokio"]
|
|
|
|
[lints.rust]
|
|
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
|
|
[[example]]
|
|
name = "bulk_io_smol"
|
|
required-features = ["smol"]
|
|
|
|
[[example]]
|
|
name = "bulk_io_tokio"
|
|
required-features = ["tokio"]
|