refactor(slint): split qbz-slint into qbz-ui lib + qbz bin; reclaim qbz binary

Slint cannot split the .slint compilation across crates, but a Slint LIBRARY
crate exposes its generated Rust types to dependent crates (verified with a
minimal proof). So:

- NEW crate `qbz-ui` (lib): owns the whole .slint tree + build.rs + bundled
  translations; `slint::include_modules!()` + the generated types (AppWindow,
  MiniPlayerWindow, all globals/structs) are re-exported. Translation domain is
  now `qbz-ui` (the .po files renamed accordingly).
- `qbz-slint` (bin) -> renamed to `qbz` (package + `[[bin]] name = "qbz"`),
  reclaiming the binary name from the retired Tauri app. It depends on `qbz-ui`
  and does `pub use qbz_ui::*;` so existing `crate::AppWindow` / `crate::*State`
  references resolve unchanged.

This splits the single ~20 GB rustc into two crates (UI/codegen vs the 75k LOC
of logic) — the foundation for lower build peak, incremental caching, and the
upcoming per-feature crate extraction.

Also fixed for the move: qbz-i18n bundled-.po include paths, the font/WGSL
`include_bytes!`/`include_str!` paths (-> ../../qbz-ui/ui/), workspace members,
dev scripts (`-p qbz`), and the CI workflows. `cargo check -p qbz` is green.

cc
This commit is contained in:
vicrodh committed 2026-06-25 17:51:09 -06:00
1 parent b9eb300516
commit c8ef2a1b1d
465 files changed
+129 -89

No files matched your search

+63 -55
View File
@@ -5506,6 +5506,61 @@ version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d"
[[package]]
name = "qbz"
version = "0.1.0"
dependencies = [
"arboard",
"async-trait",
"chrono",
"dirs 5.0.1",
"env_logger",
"futures-util",
"i-slint-backend-winit",
"image",
"ksni",
"log",
"objc2 0.5.2",
"objc2-app-kit 0.2.2",
"objc2-foundation 0.2.2",
"open",
"qbz-app",
"qbz-audio",
"qbz-booklet",
"qbz-cache",
"qbz-cast",
"qbz-core",
"qbz-credentials",
"qbz-i18n",
"qbz-integrations",
"qbz-library",
"qbz-lyrics",
"qbz-media-controls",
"qbz-mixtape",
"qbz-models",
"qbz-music-link",
"qbz-offline-cache",
"qbz-player",
"qbz-playlist-import",
"qbz-plex",
"qbz-qobuz",
"qbz-theme",
"qbz-ui",
"qconnect-app",
"qconnect-transport-ws",
"rand 0.10.1",
"reqwest",
"rfd",
"rusqlite",
"serde",
"serde_json",
"slint",
"swash",
"tokio",
"urlencoding",
"uuid 1.22.0",
]
[[package]]
name = "qbz-app"
version = "0.1.0"
@@ -5885,61 +5940,6 @@ dependencies = [
"uuid 1.22.0",
]
[[package]]
name = "qbz-slint"
version = "0.1.0"
dependencies = [
"arboard",
"async-trait",
"chrono",
"dirs 5.0.1",
"env_logger",
"futures-util",
"i-slint-backend-winit",
"image",
"ksni",
"log",
"objc2 0.5.2",
"objc2-app-kit 0.2.2",
"objc2-foundation 0.2.2",
"open",
"qbz-app",
"qbz-audio",
"qbz-booklet",
"qbz-cache",
"qbz-cast",
"qbz-core",
"qbz-credentials",
"qbz-i18n",
"qbz-integrations",
"qbz-library",
"qbz-lyrics",
"qbz-media-controls",
"qbz-mixtape",
"qbz-models",
"qbz-music-link",
"qbz-offline-cache",
"qbz-player",
"qbz-playlist-import",
"qbz-plex",
"qbz-qobuz",
"qbz-theme",
"qconnect-app",
"qconnect-transport-ws",
"rand 0.10.1",
"reqwest",
"rfd",
"rusqlite",
"serde",
"serde_json",
"slint",
"slint-build",
"swash",
"tokio",
"urlencoding",
"uuid 1.22.0",
]
[[package]]
name = "qbz-theme"
version = "0.1.0"
@@ -5947,6 +5947,14 @@ dependencies = [
"serde",
]
[[package]]
name = "qbz-ui"
version = "0.1.0"
dependencies = [
"slint",
"slint-build",
]
[[package]]
name = "qconnect-app"
version = "0.1.0"
+2 -1
View File
@@ -22,7 +22,8 @@ members = [
"qconnect-protocol",
"qconnect-transport-ws",
"qconnect-app",
"qbz-slint",
"qbz-ui",
"qbz",
"qbz-credentials",
"qbz-media-controls",
"qbz-mixtape",
+5 -5
View File
@@ -18,11 +18,11 @@ const LANGS: [&str; 5] = ["en", "es", "de", "fr", "pt"];
/// Embedded `.po` sources. Path is relative to this file
/// (`crates/qbz-i18n/src/lib.rs`): `../` = `qbz-i18n/`, `../../` = `crates/`.
const PO_EN: &str = include_str!("../../qbz-slint/translations/en/LC_MESSAGES/qbz-slint.po");
const PO_ES: &str = include_str!("../../qbz-slint/translations/es/LC_MESSAGES/qbz-slint.po");
const PO_DE: &str = include_str!("../../qbz-slint/translations/de/LC_MESSAGES/qbz-slint.po");
const PO_FR: &str = include_str!("../../qbz-slint/translations/fr/LC_MESSAGES/qbz-slint.po");
const PO_PT: &str = include_str!("../../qbz-slint/translations/pt/LC_MESSAGES/qbz-slint.po");
const PO_EN: &str = include_str!("../../qbz-ui/translations/en/LC_MESSAGES/qbz-ui.po");
const PO_ES: &str = include_str!("../../qbz-ui/translations/es/LC_MESSAGES/qbz-ui.po");
const PO_DE: &str = include_str!("../../qbz-ui/translations/de/LC_MESSAGES/qbz-ui.po");
const PO_FR: &str = include_str!("../../qbz-ui/translations/fr/LC_MESSAGES/qbz-ui.po");
const PO_PT: &str = include_str!("../../qbz-ui/translations/pt/LC_MESSAGES/qbz-ui.po");
/// Current language index (0=en, 1=es, 2=de, 3=fr, 4=pt). Defaults to en.
static CURRENT: AtomicU8 = AtomicU8::new(0);
+22
View File
@@ -0,0 +1,22 @@
[package]
name = "qbz-ui"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "Slint UI compilation unit for the qbz app — owns the .slint tree + bundled translations and exports the generated Rust types (AppWindow, MiniPlayerWindow, all globals + structs)."
[lib]
name = "qbz_ui"
path = "src/lib.rs"
[dependencies]
slint = { version = "=1.16.1", default-features = false, features = [
"std",
"compat-1-2",
"renderer-software",
"accessibility",
] }
[build-dependencies]
slint-build = "1.16"
File renamed without changes.
+8
View File
@@ -0,0 +1,8 @@
//! Slint UI compilation unit. The whole `.slint` tree (entry `ui/app.slint`)
//! is compiled by `build.rs` with bundled translations; `include_modules!`
//! brings the generated Rust types (AppWindow, MiniPlayerWindow, the globals,
//! the structs/enums) into this crate's root. They are `pub`, so the
//! `qbz-slint` binary (and future feature crates) use them via
//! `qbz_slint_ui::AppWindow` etc. — Slint generated TYPES cross crate
//! boundaries fine (only `.slint` file imports do not).
slint::include_modules!();
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 311 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 636 B

After

Width:  |  Height:  |  Size: 636 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 238 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 289 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 325 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 337 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 595 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 354 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 591 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 331 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 407 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 371 B

After

Width:  |  Height:  |  Size: 371 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 606 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 310 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 215 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 308 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 261 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 286 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 261 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 317 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 364 B

After

Width:  |  Height:  |  Size: 364 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 309 B

After

Width:  |  Height:  |  Size: 309 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 327 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 311 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 431 B

After

Width:  |  Height:  |  Size: 431 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 852 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 339 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 298 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 255 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 324 B

After

Width:  |  Height:  |  Size: 324 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 288 B

After

Width:  |  Height:  |  Size: 288 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 308 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 480 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 347 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 378 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 525 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 307 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 389 B

After

Width:  |  Height:  |  Size: 389 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 435 B

After

Width:  |  Height:  |  Size: 435 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 352 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 349 B

After

Width:  |  Height:  |  Size: 349 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 677 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 397 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 300 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 270 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 437 B

After

Width:  |  Height:  |  Size: 437 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 486 B

After

Width:  |  Height:  |  Size: 486 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 392 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 385 B

After

Width:  |  Height:  |  Size: 385 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 280 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 325 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 254 B

After

Width:  |  Height:  |  Size: 254 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 340 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 351 B

Loaded 100 of 465 files, more files were not shown because too many files have changed in this diff. Show more