Commit 7b1bc23
feat!: vendor display-dj-cli, drop HTTP sidecar (v7.0.0)
BREAKING CHANGE: collapses the bundled display-dj-server HTTP sidecar
into in-process Rust calls. The platform code (DDC/CI, gamma, WMI,
DisplayServices, dark mode, volume, wallpaper, slideshow) is now
vendored under src-tauri/src/core/ and Tauri commands invoke it
directly via spawn_blocking. There is no separate process to manage,
no port discovery, no HTTP, no externalBin, no bundled binaries, no
runtime dependency on display-dj-cli releases.
Architecture
- core/{mod,macos,windows,linux,theme,volume,wallpaper,display}.rs
vendored from display-dj-cli main.rs + platform files (~1100 LOC).
core::PlatformImpl is a cfg-gated alias to the right platform type.
- src/{display,dark_mode,volume,wallpaper}.rs are now thin Tauri-cmd
wrappers; CPU-bound calls wrapped in spawn_blocking to keep async
signatures (macOS tray pitfall).
- tray.rs::execute_command dispatches everything in-process;
build_command_url is now cfg(test)-only and always returns None.
- AppState lost sidecar_child. lib.rs lost SERVER_PORT, server_port,
kill_stale_sidecars, find_available_port, wait_for_server,
fetch_debug_on_startup, the sidecar spawn block, and the
RunEvent::Exit child.kill block. fetch_initial_tray_state now
reads core::theme/volume directly.
Removed
- tauri-plugin-shell (Cargo.toml + capabilities/default.json)
- src-tauri/binaries/ (6 prebuilt server binaries)
- externalBin in tauri.conf.json
- displayDjCliVersion in package.json
- build.rs sidecar download fallback (now just tauri_build::build()
+ the existing expose_app_version helper)
Added Cargo deps
- ddc 0.2 (top-level)
- ddc-macos 0.2, libc 0.2 (macOS)
- ddc-winapi 0.2, winapi 0.3 (Windows); Win32_Devices_Display feature
on the existing windows crate
Tests
- cargo test --lib: 229 passed
- npm test: 70 passed
- frontend build: clean
Docs
- CLAUDE.md, README.md, CONTRIBUTING.md rewritten to describe the
in-process model. New "Vendored platform core" section in
CONTRIBUTING.md replaces the old sidecar setup steps.
Net diff: +623 / -1739 across 25 files.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>1 parent be8b253 commit 7b1bc23
33 files changed
Lines changed: 3134 additions & 1741 deletions
File tree
- src-tauri
- binaries
- capabilities
- gen/schemas
- src
- core
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
329 | 328 | | |
330 | 329 | | |
331 | 330 | | |
332 | | - | |
| 331 | + | |
333 | 332 | | |
334 | | - | |
| 333 | + | |
335 | 334 | | |
336 | 335 | | |
337 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
49 | 52 | | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments