-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cargo.toml
58 lines (49 loc) · 1.42 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
[package]
name = "cross_usb"
version = "0.4.0"
authors = ["G2-Games <[email protected]>"]
repository = "https://github.com/G2-Games/cross-usb"
documentation = "https://docs.rs/cross_usb"
description = """
A Rust USB library which works seamlessly across both native and WASM targets.
"""
keywords = ["usb", "wasm", "web-usb", "webusb"]
categories = ["wasm", "web-programming", "hardware-support"]
readme = "README.md"
license = "MIT"
edition = "2021"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
thiserror = "1.0"
[dev-dependencies]
tokio-test = "0.4.3"
# Wasm deps
[target.'cfg(target_family = "wasm")'.dependencies]
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
[target.'cfg(target_family = "wasm")'.dependencies.web-sys]
version = "0.3"
features = [
"Window",
"Navigator",
"Usb",
"UsbDevice",
"UsbInterface",
"UsbRecipient",
"UsbRequestType",
"UsbControlTransferParameters",
"UsbDeviceRequestOptions",
"UsbInTransferResult",
"UsbOutTransferResult",
]
# Non-wasm deps
[target.'cfg(not(target_family = "wasm"))'.dependencies]
nusb = "0.1"
[package.metadata.wasm-pack.profile.dev.wasm-bindgen]
dwarf-debug-info = true
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc", "x86_64-apple-darwin", "aarch64-apple-darwin", "wasm32-unknown-unknown"]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(web_sys_unstable_apis)'] }