Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
455 lines (395 loc) · 17 KB
/
Copy pathCargo.toml
File metadata and controls
455 lines (395 loc) · 17 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
[workspace]
members = ["crates/*"]
exclude = [
"crates/hypercolor-ui",
"vendor/libsqlite3-sys",
"vendor/servo-script",
"vendor/tachys",
]
resolver = "3"
[workspace.package]
version = "0.10.0"
edition = "2024"
authors = ["Stefanie Jane <stef@hyperbliss.tech>"]
license = "Apache-2.0"
repository = "https://github.com/hyperb1iss/hypercolor"
homepage = "https://github.com/hyperb1iss/hypercolor"
rust-version = "1.95"
[workspace.lints.rust]
unsafe_code = "forbid"
[workspace.lints.clippy]
all = { level = "deny", priority = 0 }
style = { level = "warn", priority = 1 }
perf = { level = "deny", priority = 1 }
pedantic = { level = "deny", priority = 10 }
missing_errors_doc = { level = "allow", priority = 20 }
missing_panics_doc = { level = "allow", priority = 20 }
missing_safety_doc = { level = "allow", priority = 20 }
module_name_repetitions = { level = "allow", priority = 21 }
significant_drop_tightening = { level = "allow", priority = 21 }
must_use_candidate = { level = "allow", priority = 21 }
implicit_hasher = { level = "allow", priority = 21 }
as_conversions = { level = "allow", priority = 22 }
bool_to_int_with_if = { level = "allow", priority = 22 }
bool_assert_comparison = { level = "allow", priority = 22 }
cast_possible_truncation = { level = "allow", priority = 22 }
cast_precision_loss = { level = "allow", priority = 22 }
cast_sign_loss = { level = "allow", priority = 22 }
comparison_chain = { level = "allow", priority = 22 }
doc_markdown = { level = "allow", priority = 22 }
float_cmp = { level = "allow", priority = 22 }
implicit_saturating_sub = { level = "allow", priority = 22 }
items_after_statements = { level = "allow", priority = 22 }
large_enum_variant = { level = "allow", priority = 22 }
map_unwrap_or = { level = "allow", priority = 22 }
needless_borrow = { level = "allow", priority = 22 }
option_as_ref_cloned = { level = "allow", priority = 22 }
question_mark = { level = "allow", priority = 22 }
similar_names = { level = "allow", priority = 22 }
struct_excessive_bools = { level = "allow", priority = 22 }
too_many_arguments = { level = "allow", priority = 22 }
too_many_lines = { level = "allow", priority = 22 }
uninlined_format_args = { level = "allow", priority = 22 }
unnested_or_patterns = { level = "allow", priority = 22 }
unused_self = { level = "allow", priority = 22 }
# assert!(x.is_empty()) reads cleaner than assert_eq!(x, [] as [T; 0]).
assert_is_empty = { level = "allow", priority = 22 }
out_of_bounds_indexing = { level = "deny", priority = 30 }
enum_glob_use = { level = "deny", priority = 30 }
unwrap_used = { level = "deny", priority = 30 }
undocumented_unsafe_blocks = { level = "deny", priority = 30 }
dbg_macro = { level = "warn", priority = 31 }
todo = { level = "warn", priority = 31 }
manual_let_else = { level = "warn", priority = 36 }
redundant_else = { level = "warn", priority = 36 }
semicolon_if_nothing_returned = { level = "warn", priority = 36 }
cloned_instead_of_copied = { level = "warn", priority = 36 }
flat_map_option = { level = "warn", priority = 36 }
needless_pass_by_value = { level = "allow", priority = 36 }
trivially_copy_pass_by_ref = { level = "allow", priority = 36 }
if_not_else = { level = "warn", priority = 36 }
match_same_arms = { level = "allow", priority = 36 }
needless_continue = { level = "allow", priority = 36 }
[workspace.dependencies]
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Reports keys a derive skipped, so authoritative config decodes stay strict.
serde_ignored = "0.1.14"
# The error type Axum keeps as the source of a JSON or query rejection,
# which is where the API extractors read the offending field path.
serde_path_to_error = "0.1"
# jsonschema (0.58 through 0.60) enables serde_json/float_roundtrip globally.
# That feature changes f32 REST decoding before domain validation.
jsonschema = { version = "=0.61.1", default-features = false }
toml = "1.1"
base64 = "0.23"
chrono = { version = "0.4.45", default-features = false, features = ["std", "serde", "clock"] }
# Error handling
thiserror = "2.0"
anyhow = "1.0"
# Async runtime
tokio = { version = "1.53", features = ["full"] }
socket2 = { version = "0.6", features = ["all"] }
async-trait = "0.1"
futures-core = "0.3"
futures-util = "0.3"
tokio-util = "0.7"
spin_sleep = "1.3.3"
# Observability
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
# Data structures
crossbeam-queue = "0.3.14"
uuid = { version = "1.26", features = ["v4", "v5", "v7", "serde"] }
sha2 = "0.11"
hex = "0.4"
subtle = "2.6"
arc-swap = "1.9"
rayon = "1.12"
strum = { version = "0.28", features = ["derive"] }
# Config
dirs = "7.0"
tar = "0.4.46"
notify = "8.2"
sysinfo = "0.40.1"
nvml-wrapper = "0.13.0"
# Pinned exactly: wmi 0.18.2+ declares open ranges (windows/windows-core
# ">=0.59, <0.63"), and with tao/wry holding windows-core at 0.61 the resolver
# pairs wmi with windows 0.62 + windows-core 0.61 — which doesn't compile
# (E0277 trait mismatches). 0.18.1 requires ^0.62 for both, forcing the
# consistent pair. Re-check the resolved pairing before unpinning.
wmi = "=0.18.4"
# Servo embedder boundary
# Servo's memory-report API exposes this callback type without reexporting it.
base = { package = "servo-base", version = "0.8.0" }
servo = { version = "0.8.0", default-features = false }
# servo-allocator 0.6 made jemalloc opt-in (use-jemalloc). Core's servo
# feature enables it on non-Windows targets so the daemon keeps jemalloc
# as its global allocator. The crate Servo links declares the global
# allocator, so this pin must name Servo's exact version: a different one
# resolves to a second, unused copy and leaves the daemon on the system
# malloc. Bump it only together with servo.
servo-allocator = "=0.8.0"
surfman = "0.14"
# Crypto / auth
aes-gcm = "0.11.1"
apple-native-keyring-store = { version = "1.0.2", features = ["keychain"] }
dbus-secret-service-keyring-store = { version = "1.0.1", features = ["crypto-rust", "vendored"] }
keyring-core = "1.0.0"
rand = "0.10"
rand_core = { version = "0.10", features = ["getrandom"] }
webrtc-dtls = "0.12.0"
webrtc-util = "0.11.0"
windows-native-keyring-store = "1.1.0"
# Workspace crates
hypercolor-color = { path = "crates/hypercolor-color", version = "0.10.0" }
hypercolor-types = { path = "crates/hypercolor-types", version = "0.10.0" }
hypercolor-hal = { path = "crates/hypercolor-hal", version = "0.10.0" }
hypercolor-core = { path = "crates/hypercolor-core", version = "0.10.0" }
hypercolor-persistence = { path = "crates/hypercolor-persistence", version = "0.10.0" }
hypercolor-platform-fs = { path = "crates/hypercolor-platform-fs", version = "0.10.0" }
hypercolor-install = { path = "crates/hypercolor-install", version = "0.10.0" }
hypercolor-worker-retention = { path = "crates/hypercolor-worker-retention", version = "0.10.0" }
hypercolor-gpu-frame = { path = "crates/hypercolor-gpu-frame", version = "0.10.0" }
hypercolor-linux-input = { path = "crates/hypercolor-linux-input", version = "0.10.0" }
hypercolor-pipewire-interop = { path = "crates/hypercolor-pipewire-interop", version = "0.10.0" }
hypercolor-linux-session = { path = "crates/hypercolor-linux-session", version = "0.10.0" }
hypercolor-linux-gpu-interop = { path = "crates/hypercolor-linux-gpu-interop", version = "0.10.0" }
hypercolor-macos-gpu-interop = { path = "crates/hypercolor-macos-gpu-interop", version = "0.10.0" }
hypercolor-macos-capture = { path = "crates/hypercolor-macos-capture", version = "0.10.0" }
hypercolor-macos-input = { path = "crates/hypercolor-macos-input", version = "0.10.0" }
hypercolor-macos-owner = { path = "crates/hypercolor-macos-owner", version = "0.10.0" }
hypercolor-windows-install-native = { path = "crates/hypercolor-windows-install-native", version = "0.10.0" }
hypercolor-windows-session = { path = "crates/hypercolor-windows-session", version = "0.10.0" }
hypercolor-windows-capture = { path = "crates/hypercolor-windows-capture", version = "0.10.0" }
hypercolor-windows-gpu-interop = { path = "crates/hypercolor-windows-gpu-interop", version = "0.10.0" }
hypercolor-windows-telemetry = { path = "crates/hypercolor-windows-telemetry", version = "0.10.0" }
hypercolor-driver-adalight = { path = "crates/hypercolor-driver-adalight", version = "0.10.0" }
hypercolor-driver-api = { path = "crates/hypercolor-driver-api", version = "0.10.0" }
hypercolor-driver-conformance = { path = "crates/hypercolor-driver-conformance" }
hypercolor-driver-support = { path = "crates/hypercolor-driver-support", version = "0.10.0" }
hypercolor-driver-builtin = { path = "crates/hypercolor-driver-builtin", version = "0.10.0", default-features = false }
hypercolor-driver-hue = { path = "crates/hypercolor-driver-hue", version = "0.10.0" }
hypercolor-driver-nanoleaf = { path = "crates/hypercolor-driver-nanoleaf", version = "0.10.0" }
hypercolor-driver-openrgb = { path = "crates/hypercolor-driver-openrgb", version = "0.10.0" }
hypercolor-driver-wled = { path = "crates/hypercolor-driver-wled", version = "0.10.0" }
hypercolor-driver-govee = { path = "crates/hypercolor-driver-govee", version = "0.10.0" }
hypercolor-driver-pixel = { path = "crates/hypercolor-driver-pixel", version = "0.10.0" }
hypercolor-driver-lifx = { path = "crates/hypercolor-driver-lifx", version = "0.10.0" }
hypercolor-driver-twinkly = { path = "crates/hypercolor-driver-twinkly", version = "0.10.0" }
hypercolor-driver-wiz = { path = "crates/hypercolor-driver-wiz", version = "0.10.0" }
hypercolor-driver-yeelight = { path = "crates/hypercolor-driver-yeelight", version = "0.10.0" }
hypercolor-network = { path = "crates/hypercolor-network", version = "0.10.0" }
hypercolor-openrgb-sdk = { path = "crates/hypercolor-openrgb-sdk", version = "0.10.0" }
hypercolor-pixel-protocols = { path = "crates/hypercolor-pixel-protocols", version = "0.10.0" }
hypercolor-openrgb-host = { path = "crates/hypercolor-openrgb-host", version = "0.10.0" }
hypercolor-tui = { path = "crates/hypercolor-tui", version = "0.10.0" }
# Audio + input capture
realfft = "3.5"
rustfft = "6.4"
cpal = "0.18.2"
libpulse-binding = "2.30.1"
evdev = "0.13.2"
# HTTP client
reqwest = { version = "0.13", features = ["json", "query"] }
# Zero-copy byte reinterpretation for wire-format protocol structs
zerocopy = { version = "0.8", features = ["derive"] }
# Network / device backends
if-addrs = "0.15.0"
mdns-sd = "0.21"
mach2 = "0.7"
nusb = { version = "0.2.7", features = ["tokio"] }
zbus = { version = "=5.19.0", default-features = false, features = ["tokio"] }
# Screen capture
ash = "0.38"
ashpd = { version = "0.14.0", default-features = false, features = ["tokio", "screencast"] }
glow = "0.17"
libc = "0.2"
pipewire = "0.10.1"
# HTTP / API
axum = { version = "0.8", features = ["multipart", "ws"] }
tower = "0.5"
tower-http = { version = "0.7", features = ["cors", "fs", "trace"] }
rmcp = { version = "3.5.0", default-features = false, features = ["server", "transport-streamable-http-server"] }
utoipa = { version = "6.0.0", features = ["axum_extras", "preserve_path_order", "uuid"] }
utoipa-axum = "0.3.0"
utoipa-swagger-ui = { version = "10.0.2", features = ["axum", "vendored"] }
# CLI
clap = { version = "4.6", features = ["derive", "cargo", "env"] }
clap_complete = "4.6"
owo-colors = "4"
unicode-width = "0.2.2"
# TUI
ratatui = "0.30"
crossterm = "0.29"
dpi = "0.1"
opaline = { version = "0.4", features = ["global-state", "owo-colors", "widgets", "discovery"] }
tachyonfx = "0.25"
ratatui-image = { version = "11", default-features = false, features = ["crossterm", "image-defaults"] }
tokio-tungstenite = "0.30"
open = "5"
# Imaging
image = { version = "0.25.10", default-features = false, features = ["gif", "jpeg", "png", "webp"] }
gif = "0.14.2"
rlottie = "0.5.4"
gstreamer = "0.25.4"
gstreamer-app = "0.25.2"
gstreamer-video = "0.25.4"
turbojpeg = { version = "1.5.1", default-features = false, features = ["cmake", "require-simd"] }
fast_image_resize = "6.1.0"
wgpu = { version = "30.0.1", default-features = false, features = ["std", "vulkan", "metal", "dx12", "gles", "wgsl"] }
wgpu-hal = { version = "30.0.1", default-features = false, features = ["vulkan"] }
objc2-core-foundation = { version = "0.3.2", default-features = false }
objc2-core-graphics = { version = "0.3.2", default-features = false }
objc2-app-kit = { version = "0.3.2", default-features = false }
objc2-avf-audio = { version = "0.3.2", default-features = false }
objc2-core-media = { version = "0.3.2", default-features = false }
objc2-core-video = { version = "0.3.2", default-features = false }
objc2-foundation = { version = "0.3.2", default-features = false }
objc2-io-surface = { version = "0.3.2", default-features = false }
objc2-metal = { version = "0.3.2", default-features = false }
objc2-screen-capture-kit = { version = "0.3.2", default-features = false }
objc2 = { version = "0.6.4", default-features = false }
pollster = "1.0.1"
# Testing
tempfile = "3.27"
criterion = { version = "0.8.2", features = ["html_reports"] }
stats_alloc = "0.1.10"
# Servo's script crate, vendored with Hypercolor's patches applied on top of
# the published 0.8.0 source. vendor/servo-script/HYPERCOLOR.md lists each
# patch and when to drop the vendor. The patch matches servo-script 0.8.0
# only: bumping servo leaves it unused behind a single cargo warning, which
# scripts/check-vendored-patches.sh turns into a CI failure, so re-vendor or
# drop it in the same change.
#
# libsqlite3-sys 0.36.0, vendored to bundle SQLite 3.51.3 in place of 3.51.1.
# servo-net pins rusqlite ^0.38, which pins this crate, so no dependency bump
# can reach the SQLite fixes; vendor/libsqlite3-sys/HYPERCOLOR.md lists them
# and says when to drop the vendor. scripts/check-vendored-patches.sh fails
# CI as soon as a bump moves the crate off 0.36.0.
[patch.crates-io]
libsqlite3-sys = { path = "vendor/libsqlite3-sys" }
servo-script = { path = "vendor/servo-script" }
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
strip = true
# Keep local development responsive without the massive runtime cliff of
# completely unoptimized Servo/canvas streaming in debug builds.
[profile.dev]
opt-level = 1
debug = "line-tables-only"
# Keep Hypercolor crates debuggable, but treat third-party dependencies more
# like "runtime" code: optimize them, trim debug payload, and drop expensive
# safety instrumentation that mostly hurts hot render paths.
[profile.dev.package."*"]
opt-level = 2
debug = false
debug-assertions = false
overflow-checks = false
# The daemon render path is hot even in local iteration, so give the core
# runtime a bit more help than the rest of the workspace.
[profile.dev.package.hypercolor-core]
opt-level = 2
[profile.dev.package.hypercolor-daemon]
opt-level = 2
[profile.dev.package.hypercolor-hal]
opt-level = 2
# Servo HTML effects spend most CPU time in software canvas rasterization
# (`vello_cpu` + SIMD helpers). Keep dev edit-compile loops fast while
# avoiding debug-profile runtime cliffs for live preview.
[profile.dev.package.servo]
opt-level = 3
[profile.dev.package.vello_cpu]
opt-level = 3
[profile.dev.package.vello_common]
opt-level = 3
[profile.dev.package.fearless_simd]
opt-level = 3
# JavaScript-heavy effects spend significant time in Servo's script pipeline.
[profile.dev.package.mozjs]
opt-level = 3
[profile.dev.package.mozjs_sys]
opt-level = 3
[profile.dev.package.servo-script]
opt-level = 3
[profile.dev.package.servo-script-bindings]
opt-level = 3
[profile.dev.package.servo-paint]
opt-level = 3
[profile.dev.package.servo-layout]
opt-level = 3
[profile.dev.package.webrender]
opt-level = 3
[profile.dev.package.webrender_api]
opt-level = 3
# Preview keeps the fast inner dev loop from `dev`, but disables the remaining
# runtime-heavy safety checks in Hypercolor crates so local daemon/UI runs feel
# much closer to release builds.
[profile.preview]
inherits = "dev"
debug-assertions = false
overflow-checks = false
[profile.preview.package."*"]
opt-level = 2
debug = false
debug-assertions = false
overflow-checks = false
# Preserve full symbols as an explicit opt-in without making every local test
# executable carry them by default.
[profile.debugging]
inherits = "dev"
debug = "full"
[profile.debugging.package."*"]
debug = "full"
[profile.preview.package.hypercolor-core]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.preview.package.hypercolor-daemon]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.preview.package.hypercolor-hal]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.preview.package.servo]
opt-level = 3
debug = 0
[profile.preview.package.vello_cpu]
opt-level = 3
debug = 0
[profile.preview.package.vello_common]
opt-level = 3
debug = 0
[profile.preview.package.fearless_simd]
opt-level = 3
debug = 0
[profile.preview.package.mozjs]
opt-level = 3
debug = 0
[profile.preview.package.mozjs_sys]
opt-level = 3
debug = 0
[profile.preview.package.servo-script]
opt-level = 3
debug = 0
[profile.preview.package.servo-script-bindings]
opt-level = 3
debug = 0
[profile.preview.package.servo-paint]
opt-level = 3
debug = 0
[profile.preview.package.servo-layout]
opt-level = 3
debug = 0
[profile.preview.package.webrender]
opt-level = 3
debug = 0
[profile.preview.package.webrender_api]
opt-level = 3
debug = 0