-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Cargo.toml
103 lines (89 loc) · 3.52 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[package]
name = "cyme"
authors = ["John Whittington <[email protected]>"]
description = "List system USB buses and devices. A modern cross-platform lsusb"
repository = "https://github.com/tuna-f1sh/cyme"
readme = "README.md"
license = "GPL-3.0-or-later"
version = "2.1.0"
edition = "2021"
keywords = ["usb", "lsusb", "system_profiler", "macos", "libusb"]
categories = ["command-line-utilities"]
exclude = [".github"]
[dependencies]
clap = { version = "4.0.22", features = ["derive", "wrap_help"] }
colored = "2.0.0"
itertools = "0.10.5"
lazy_static = "1.4.0"
rusb = { version = "0.9.4", optional = true }
nusb = { version = "0.1.10", optional = true }
log = "0.4.17"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.87"
serde_with = "2.0.1"
simple_logger = "4.0.0"
usb-ids = { version = "1" }
heck = "0.4.0"
clap_complete = { version = "4.0.6", optional = true }
clap_mangen = { version = "0.2.5", optional = true }
dirs = "4.0.0"
rand = "0.8.5"
terminal_size = "0.2.5"
strum = "0.26"
strum_macros = "0.26"
regex = { version = "1.10.5", optional = true }
uuid = { version = "1.9.1", features = ["serde"] }
pci-ids = "0.2.5"
unicode-width = "0.2.0"
[patch.crates-io]
nusb = { git = "https://github.com/kevinmehall/nusb", branch = "main" }
[dev-dependencies]
diff = "0.1"
assert-json-diff = "2.0.2"
[target.'cfg(target_os="linux")'.dependencies]
udevrs = { version = "^0.3.0", optional = true }
udevlib = { package = "udev", version = "^0.8.0", optional = true }
[target.'cfg(target_os="macos")'.dependencies]
core-foundation = "0.9.3"
core-foundation-sys = "0.8.4"
io-kit-sys = "0.4.0"
[features]
libusb = ["dep:rusb"]
udev = ["dep:udevrs"]
udev_hwdb = ["udevlib?/hwdb"]
# libudev C binding
udevlib = ["dep:udevlib"]
usb_test = []
regex_icon = ["dep:regex"]
cli_generate = ["dep:clap_complete", "dep:clap_mangen"] # for generating man and completions
native = ["nusb", "udev"] # pure Rust USB and udev bindings
ffi = ["libusb", "udevlib"] # C bindings for libusb and libudev
default = ["native", "regex_icon"] # default native Rust USB (nusb, udevrs) with regex icon name lookup
[[bin]]
name = "cyme"
path = "src/main.rs"
[profile.release]
lto = true
strip = true
panic = "abort"
codegen-units = 1 # quicker binary, slower build
[package.metadata.cross.target.arm-unknown-linux-gnueabihf]
pre-build = ["dpkg --add-architecture armhf && apt-get update && apt-get install --assume-yes libusb-1.0-0-dev:armhf libudev-dev:armhf"]
[package.metadata.cross.target.aarch64-unknown-linux-gnu]
pre-build = ["dpkg --add-architecture arm64 && apt-get update && apt-get install --assume-yes libusb-1.0-0-dev:arm64 libudev-dev:arm64"]
[package.metadata.cross.target.i686-unknown-linux-gnu]
pre-build = ["dpkg --add-architecture i386 && apt-get update && apt-get install --assume-yes libusb-1.0-0-dev:i386 libudev-dev:i386"]
[package.metadata.cross.target.x86_64-unknown-linux-gnu]
pre-build = ["apt-get update && apt-get install --assume-yes libusb-1.0-0-dev libudev-dev"]
[package.metadata.cross.target.aarch64-linux-android]
image = "ghcr.io/cross-rs/aarch64-linux-android:main"
[package.metadata.deb]
section = "utility"
copyright = "2024, John Whittington <[email protected]>"
changelog = "CHANGELOG.md"
extended-description = """Profiles system USB buses and the devices on those buses, including full device descriptors. Compatable with lsusb arguments and output whilst adding new features."""
assets = [
["target/release/cyme", "usr/bin/", "755"],
["README.md", "usr/share/doc/cyme/README", "644"],
["doc/cyme.1", "/usr/share/man/man1/cyme.1", "644"],
]