[package] name = "musicmouse-slint" version = "0.1.0" edition = "2021" description = "Native Slint front-end for the MusicMouse player" [dependencies] # default-features off so the renderer is an explicit choice below, never an # accident: on a Pi 5 (Mesa V3D) the default FemtoVG renderer draws every runtime # loaded Image as solid black - see slint-ui/slint#11785 - which for this app means # every album cover. The `skia` feature is the device's way out. slint = { version = "1.15", default-features = false, features = [ "compat-1-2", "std", ] } serde = { version = "1", features = ["derive"] } serde_json = "1" # Blocking HTTP and blocking websockets, each on its own thread, rather than an async # runtime. The whole client makes one library request, one websocket connection and a # trickle of covers; tokio would be more machinery than the job has work. ureq = { version = "2.12", default-features = false, features = ["json", "gzip"] } tungstenite = { version = "0.24", default-features = false, features = ["handshake"] } image = { version = "0.25", default-features = false, features = ["jpeg", "png"] } dirs = "5" # Only for `normalize()`: folding "Grüffelo" to "gruffelo" needs a real NFD pass, which # is what the web client gets from String.prototype.normalize for free. unicode-normalization = "0.1" [build-dependencies] slint-build = "1.15" [features] default = ["desktop"] # Development on a normal desktop session. FemtoVG is fine on x86/Mesa and builds in # seconds, which is what makes it the right default *here* and the wrong one on the Pi. # `renderer-software` rides along so `SLINT_BACKEND=winit-software` works without a # rebuild: it is how the UI can be rendered and screenshotted on a machine with no GPU # (or no session), and it is the fallback the Pi 5 FemtoVG bug leaves standing. desktop = ["slint/backend-winit", "slint/renderer-femtovg", "slint/renderer-software"] # Same window, Skia instead - the combination the device runs, so visual checks here # match what ships. Costs a long first build while rust-skia bootstraps. skia = ["slint/backend-winit", "slint/renderer-skia"] # The device: straight onto KMS/DRM with no X, no Wayland and no compositor, input # via libinput. (`backend-linuxkms-noseat` is deprecated upstream in favour of this.) # # Build it with `--no-default-features --features kiosk`: cargo features are additive, # so leaving `desktop` enabled links winit and linuxkms into the same binary. kiosk = ["slint/backend-linuxkms-libinput", "slint/renderer-skia"] [profile.release] opt-level = 3 lto = "thin" codegen-units = 1 panic = "abort" # The UI is laid out and hit-tested in debug builds too; an unoptimised image resize # on a 343-album first run is otherwise the slowest thing in the app by far. [profile.dev.package.image] opt-level = 3 [profile.dev.package.slint] opt-level = 2