The client half of the host's new `os=` advert, shared once in pf-client-core: `sanitize_os` (mDNS is unauthenticated input — lowercase `[a-z0-9._-]` tokens, capped) and `os_icon_tokens`, the most-specific-first walk with the brand aliases (`macos`→apple, `steamos`→steam) every platform resolves through. `DiscoveredHost` carries the chain, `KnownHost` persists it (`serde(default)`, elided when empty — older stores load unchanged and older clients read back exactly what they wrote), `upsert` moves it only when carried, and `learn_os` mirrors `learn_mac` — no-op, no disk write when unchanged — so the mark survives the host going to sleep. GTK shells: the card's status row leads with a recolorable symbolic glyph. That needed real embedded assets — the shells had none — so `data/` gains the ten `pf-os-*-symbolic` SVGs compiled into a gresource (new build.rs, glib-build-tools) and registered on the icon theme at startup; the Adwaita theme then tints them like every other status glyph. WinUI shell: reactor renders raster-from-URI only, so the embedded mid-gray PNGs (legible on both themes) materialize once into %LOCALAPPDATA%\punktfunk\os-icons\ — the library's poster-art pattern — and the tile's status row leads with a 16px image. The couch UI plumbs `HostRow.os` (live advert preferred, else the store) for a Skia glyph that is a declared follow-up; `--list-hosts` / `hosts --json` emit the stored chain so the Decky plugin can read it. A host that advertises no `os` renders everywhere exactly as it did before the field existed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
43 lines
1.7 KiB
TOML
43 lines
1.7 KiB
TOML
[package]
|
|
name = "punktfunk-client-linux"
|
|
description = "Native Linux punktfunk/1 client — GTK4/libadwaita shell, FFmpeg decode, PipeWire audio, SDL3 gamepads"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
authors.workspace = true
|
|
repository.workspace = true
|
|
|
|
[[bin]]
|
|
name = "punktfunk-client"
|
|
path = "src/main.rs"
|
|
|
|
# Everything is Linux-gated so `cargo build --workspace` stays green on macOS (the Mac
|
|
# client lives in clients/apple); on other platforms this builds as a stub binary.
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
# Session pump, decode, audio, gamepads, trust, discovery, keymap — the UI-agnostic
|
|
# plumbing, shared with the upcoming Vulkan session binary (design: punktfunk-planning
|
|
# linux-client-rearchitecture.md). This crate keeps only the GTK shell + GL presenter.
|
|
pf-client-core = { path = "../../crates/pf-client-core" }
|
|
punktfunk-core = { path = "../../crates/punktfunk-core", features = ["quic"] }
|
|
|
|
# UI shell. GraphicsOffload needs GTK ≥ 4.14; black-background ≥ 4.16. AlertDialog/
|
|
# PreferencesDialog need libadwaita ≥ 1.5.
|
|
gtk = { package = "gtk4", version = "0.11", features = ["v4_16"] }
|
|
adw = { package = "libadwaita", version = "0.9", features = ["v1_5"] }
|
|
async-channel = "2"
|
|
|
|
serde_json = "1"
|
|
anyhow = "1"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
relm4 = { version = "0.11", features = ["libadwaita"] }
|
|
|
|
# Compiles data/ (the OS-mark symbolic icons) into the embedded gresource (build.rs) —
|
|
# needs `glib-compile-resources`, which ships with the GTK dev stack this crate needs anyway.
|
|
[target.'cfg(target_os = "linux")'.build-dependencies]
|
|
glib-build-tools = "0.22"
|
|
|
|
[lints]
|
|
workspace = true
|