-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathCargo.toml
More file actions
74 lines (67 loc) · 2.39 KB
/
Copy pathCargo.toml
File metadata and controls
74 lines (67 loc) · 2.39 KB
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
[package]
name = "sinowisp"
description = """
A utility for reading and writing flash contents on Sinowealth 8051-based HID devices through the commonly found ISP bootloader
"""
repository = "https://github.com/carlossless/sinowisp"
version = "2.0.0"
edition = "2021"
license = "MIT"
rust-version = "1.88"
# The crate ships both a reusable library (`src/lib.rs`) and the `sinowisp`
# CLI (`src/main.rs`). The CLI-only dependencies live behind the default `cli`
# feature so the library can still be built on its own (e.g. for the web via
# WebHID/wasm) with `--no-default-features`.
[features]
default = ["cli"]
cli = [
"dep:clap",
"dep:clap-num",
"dep:dialoguer",
"dep:hidparser",
"dep:indicatif",
"dep:itertools",
"dep:md5",
"dep:simple_logger",
"dep:log",
]
# Switch hidra to its nusb-based USB backend instead of the per-OS native one.
# Linux always uses nusb (auto-selected via the target-specific dependency
# below); this feature exists to opt into nusb on macOS/Windows as well.
nusb = ["hidra/nusb"]
[[bin]]
name = "sinowisp"
path = "src/main.rs"
required-features = ["cli"]
[dependencies]
# Pure-Rust HID. On macOS/Windows this uses hidra's native per-OS backend; on
# Linux the nusb backend is auto-selected via the target-specific dependency
# below (the hidapi `linux-static-libusb` equivalent). wasm uses WebHID.
hidra = "0.0.2"
ihex = "3.0"
thiserror = "2.0"
phf = { version = "0.11", features = ["macros"] }
# CLI-only dependencies (enabled by the `cli` feature).
clap = { version = "4.1", optional = true }
clap-num = { version = "1.0", optional = true }
dialoguer = { version = "0.11.0", optional = true }
hidparser = { version = "1.0.3", optional = true }
indicatif = { version = "0.17.11", optional = true }
itertools = { version = "0.14.0", optional = true }
md5 = { version = "0.7", optional = true }
log = { version = "0.4", features = ["max_level_debug"], optional = true }
[dependencies.simple_logger]
version = "5.1"
default-features = false
features = ["stderr", "colors", "timestamps"]
optional = true
# On Linux there is no native hidraw path we want; always use hidra's nusb
# backend. Cargo features are additive, so this is unconditional on Linux.
[target.'cfg(target_os = "linux")'.dependencies]
hidra = { version = "0.0.2", features = ["nusb"] }
[dev-dependencies]
assert_cmd = "2.0.17"
chrono = "0.4.41"
predicates = "3.1.3"
serial_test = "3.2.0"
stdext = "0.3.3"