[package] name = "nusb" version = "0.2.0-beta.1" description = "Cross-platform low-level access to USB devices in pure Rust" categories = ["hardware-support"] keywords = ["usb", "hardware"] authors = ["Kevin Mehall "] 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] atomic-waker = "1.1.2" futures-core = "0.3.29" log = "0.4.20" once_cell = "1.18.0" slab = "0.4.9" [dev-dependencies] env_logger = "0.10.0" futures-lite = "1.13.0" [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.9.2", features = ["ioctl"] } [target.'cfg(target_os="windows")'.dependencies] windows-sys = { version = "0.59.0", 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.9.3" core-foundation-sys = "0.8.4" io-kit-sys = "0.4.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"] } [features] # Use the `blocking` crate for making blocking IO async smol = ["dep:blocking"] # Use `tokio`'s IO threadpool for making blocking IO async tokio = ["dep:tokio"] [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }