Completes W4: users can upload a custom avatar image. - `Avatar::Custom(String)` carries a base64 PNG. `process_upload` decodes an arbitrary png/jpeg, downscales so the longest side is 128px (aspect kept), re-encodes PNG, base64s, and rejects anything over a hard cap. - Settings "Avatar" gains an "Upload image…" button (native picker via rfd's xdg-portal backend, off-thread through Task::perform) and shows the current custom avatar as a selected tile. - Untrusted peer avatars are validated at gossip ingest (`sanitize_incoming`): a custom image must be within the byte cap and decode as a PNG within bounds (image-crate decode limits guard against decompression bombs) or it's downgraded to a monogram. - Raised the gossip max message size to 64 KB so a capped custom avatar fits inline on the presence plane (all peers already need a matching build). - Deps: image (png/jpeg only), rfd (xdg-portal, no GTK); only `rfd`+`pollster` are actually new in the lockfile (rest were already transitive). cargo audit clean (0 vulns; the 2 unmaintained warnings are pre-existing S7). - `Controller::send` now returns bool (was a Result carrying the now-larger CoreCommand by value, which tripped result_large_err). - +5 avatar unit tests (upload resize/round-trip, reject non-image, ingest accept/reject). 227 lib tests green, clippy clean. Manual check: Settings → Avatar → Upload; confirm the picker opens and the image shows for you and (after redeploy) for a peer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
48 lines
1.4 KiB
TOML
48 lines
1.4 KiB
TOML
[package]
|
|
name = "peerspeak"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
[lib]
|
|
name = "peerspeak"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "peerspeak"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "test_net"
|
|
path = "src/bin/test_net.rs"
|
|
|
|
[[bin]]
|
|
name = "specview"
|
|
path = "src/bin/specview.rs"
|
|
|
|
[dependencies]
|
|
anyhow = "1.0.102"
|
|
async-trait = "0.1.89"
|
|
base64 = "0.22.1"
|
|
bytes = "1.11.1"
|
|
dirs = "6.0.0"
|
|
iced = { version = "0.14.0", features = ["canvas", "image"] }
|
|
# W4 custom avatars: decode/resize an arbitrary user image (png/jpeg only to keep
|
|
# the codec surface small) and a native file picker (xdg-portal backend, no GTK).
|
|
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
|
|
rfd = { version = "0.17", default-features = false, features = ["xdg-portal"] }
|
|
iroh = "1.0.0-rc.0"
|
|
iroh-gossip = "0.99.0"
|
|
opus = "0.3.1"
|
|
# v0_3_49 exposes `Buffer::requested()` (the graph's per-cycle quantum), used by
|
|
# the playback RT callback to fill exactly what the device asks for instead of
|
|
# pinning the buffer to a hard-coded 1024-frame quantum (crackle on non-1024
|
|
# hardware). The field has existed in libpipewire since 0.3.49 (2022).
|
|
pipewire = { version = "0.9", features = ["v0_3_49"] }
|
|
rand = "0.10.1"
|
|
ringbuf = "0.5.0"
|
|
serde = { version = "1.0.228", features = ["derive"] }
|
|
serde_json = "1.0.150"
|
|
thiserror = "2.0.18"
|
|
tokio = { version = "1.52.3", features = ["full"] }
|
|
tokio-stream = "0.1.18"
|