forked from ArthurHeymans/rflasher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
131 lines (117 loc) · 3.9 KB
/
Cargo.toml
File metadata and controls
131 lines (117 loc) · 3.9 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
[workspace]
resolver = "2"
members = [
"crates/rflasher-core",
"crates/rflasher-flash",
"crates/rflasher-chips-codegen",
"crates/rflasher-ch341a",
"crates/rflasher-ch347",
"crates/rflasher-dediprog",
"crates/rflasher-serprog",
"crates/rflasher-ftdi",
"crates/rflasher-ft4222",
"crates/rflasher-internal",
"crates/rflasher-linux-spi",
"crates/rflasher-linux-mtd",
"crates/rflasher-linux-gpio",
"crates/rflasher-dummy",
"crates/rflasher-raiden",
"crates/rflasher-repl",
"crates/rflasher-wasm",
]
# Exclude WASM crate from default build (requires wasm32 target)
default-members = [
".",
"crates/rflasher-core",
"crates/rflasher-flash",
"crates/rflasher-chips-codegen",
"crates/rflasher-ch341a",
"crates/rflasher-ch347",
"crates/rflasher-dediprog",
"crates/rflasher-serprog",
"crates/rflasher-ftdi",
"crates/rflasher-ft4222",
"crates/rflasher-internal",
"crates/rflasher-linux-spi",
"crates/rflasher-linux-mtd",
"crates/rflasher-linux-gpio",
"crates/rflasher-dummy",
"crates/rflasher-raiden",
"crates/rflasher-repl",
]
[workspace.package]
version = "0.1.0"
edition = "2021"
license = "GPL-2.0-or-later"
repository = "https://github.com/user/rflasher"
[workspace.dependencies]
# Internal crates - NOTE: is_sync is NOT included here to allow async builds (WASM)
# Crates that need sync mode should add `features = ["is_sync"]` explicitly
rflasher-core = { path = "crates/rflasher-core", default-features = false }
# Core
bitflags = "2"
embedded-io = "0.6"
embedded-io-async = "0.6"
log = "0.4"
# std-only
thiserror = "2"
env_logger = "0.11"
tokio = { version = "1", features = ["full"] }
nusb = { git = "https://github.com/ArthuRheymans/nusb.git", branch = "task/webusb-rebased" }
clap = { version = "4", features = ["derive"] }
indicatif = "0.17"
# Build/codegen
serde = { version = "1", features = ["derive"] }
ron = "0.8"
quote = "1"
proc-macro2 = "1"
syn = "2"
prettyplease = "0.2"
# no_std compatible
heapless = { version = "0.8", features = ["serde"] }
once_cell = { version = "1.21", default-features = false }
maybe-async = "0.2"
[package]
name = "rflasher"
version.workspace = true
edition.workspace = true
license.workspace = true
[features]
default = ["dummy", "ch341a", "ch347", "dediprog", "serprog", "ft4222", "ftdi", "linux-spi", "linux-mtd", "internal", "raiden"]
# Programmer features (passed through to rflasher-flash)
dummy = ["rflasher-flash/dummy"]
ch341a = ["rflasher-flash/ch341a"]
ch347 = ["rflasher-flash/ch347"]
dediprog = ["rflasher-flash/dediprog"]
serprog = ["rflasher-flash/serprog"]
ftdi = ["rflasher-flash/ftdi"]
# Use pure-Rust rs-ftdi backend for FTDI MPSSE (instead of C libftdi1)
ftdi-native = ["rflasher-flash/ftdi-native"]
ft4222 = ["rflasher-flash/ft4222"]
linux-spi = ["rflasher-flash/linux-spi"]
linux-mtd = ["rflasher-flash/linux-mtd"]
linux-gpio = ["rflasher-flash/linux-gpio"]
internal = ["rflasher-flash/internal"]
raiden = ["rflasher-flash/raiden"]
# REPL feature for scripting with Steel Scheme
repl = ["dep:rflasher-repl"]
# Enable all programmers
all-programmers = ["dummy", "ch341a", "ch347", "dediprog", "serprog", "ftdi", "ft4222", "linux-spi", "linux-mtd", "linux-gpio", "internal", "raiden"]
# Enable all programmers with pure-Rust FTDI backend
all-programmers-native = ["dummy", "ch341a", "ch347", "dediprog", "serprog", "ftdi-native", "ft4222", "linux-spi", "linux-mtd", "linux-gpio", "internal", "raiden"]
[dependencies]
rflasher-core = { workspace = true, features = ["std", "is_sync"] }
rflasher-flash = { path = "crates/rflasher-flash", features = ["std", "is_sync"] }
rflasher-repl = { path = "crates/rflasher-repl", optional = true }
clap.workspace = true
clap_mangen = "0.2"
env_logger.workspace = true
log.workspace = true
indicatif.workspace = true
thiserror.workspace = true
[dev-dependencies]
nusb = { workspace = true }
[profile.release]
lto = true
codegen-units = 1
panic = "abort"