Rewrite the app in Rust #1

Open
brian wants to merge 1 commit from rust-rewrite into main
Owner

Replaces the Python/PyGObject app with a Rust workspace.

Structure

  • crates/core — Kick API, Pusher chat, models, playlist parsing, decoder selection, settings DB. No GTK, so CI tests it on the bare runner.
  • crates/app — GTK4/libadwaita app; libmpv rendered into a GtkGLArea via a small hand-written FFI layer.

The settings database, image cache and keyring entries keep their formats, so existing state carries over.

Behaviour changes

  • No more timed stream reloads. Kick's playback tokens now last ~10 min, so the old 15-min refresh margin reloaded the stream every 30 s. Measured: master and variant playlists keep serving 25 min past the token's exp. The URL is now re-resolved only when mpv reports a failure.
  • Images decoded in-process (image crate) instead of via GNOME 50's per-image glycin loader processes.
  • Avatars on the browse grid (read from channel, which the old parser missed).
  • Zone-less stream start times treated as UTC.
  • Entering HTPC mode stops the desktop player.
  • Removed the TLS impersonation preference, which was never implemented.

Build / CI

  • Manifest builds with the rust-stable SDK extension from vendored crates; glad is a pinned file source, so no Python wheels are vendored.
  • CI vendors crates with cargo vendor, runs core tests, and passes --install-deps-from=flathub. This workflow has not run yet.
  • scripts/flatpak-dev.sh builds/runs inside the SDK without host -devel packages.

Tested

  • 132 tests pass, including inside the Flatpak build; clippy clean.
  • Live against Kick: browse, playback (nvdec-copy 1080p60), chat, transport bar, HTPC navigation via a virtual uinput remote.
  • Not tested: sign-in / sending chat, clips on the offline page.

🤖 Generated with Claude Code

Replaces the Python/PyGObject app with a Rust workspace. ## Structure - `crates/core` — Kick API, Pusher chat, models, playlist parsing, decoder selection, settings DB. No GTK, so CI tests it on the bare runner. - `crates/app` — GTK4/libadwaita app; libmpv rendered into a `GtkGLArea` via a small hand-written FFI layer. The settings database, image cache and keyring entries keep their formats, so existing state carries over. ## Behaviour changes - **No more timed stream reloads.** Kick's playback tokens now last ~10 min, so the old 15-min refresh margin reloaded the stream every 30 s. Measured: master and variant playlists keep serving 25 min past the token's `exp`. The URL is now re-resolved only when mpv reports a failure. - Images decoded in-process (`image` crate) instead of via GNOME 50's per-image glycin loader processes. - Avatars on the browse grid (read from `channel`, which the old parser missed). - Zone-less stream start times treated as UTC. - Entering HTPC mode stops the desktop player. - Removed the TLS impersonation preference, which was never implemented. ## Build / CI - Manifest builds with the `rust-stable` SDK extension from vendored crates; glad is a pinned file source, so no Python wheels are vendored. - CI vendors crates with `cargo vendor`, runs core tests, and passes `--install-deps-from=flathub`. **This workflow has not run yet.** - `scripts/flatpak-dev.sh` builds/runs inside the SDK without host `-devel` packages. ## Tested - 132 tests pass, including inside the Flatpak build; clippy clean. - Live against Kick: browse, playback (nvdec-copy 1080p60), chat, transport bar, HTPC navigation via a virtual uinput remote. - **Not tested:** sign-in / sending chat, clips on the offline page. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Replace the Python/PyGObject implementation with a two-crate Rust
workspace:

- crates/core: the Kick API client, Pusher chat protocol, models,
  playlist parsing, decoder selection and settings database. It links
  nothing from GTK, so CI tests it on the bare runner.
- crates/app: the GTK4/libadwaita application, with libmpv rendered
  into a GtkGLArea through a small hand-written FFI layer.

The settings database, image cache and keyring entries keep their
existing formats, so state from the Python build carries over.

Behaviour changes found while porting:

- Stop reloading live streams on a timer. Kick's playback tokens now
  last ~10 minutes, so the 15-minute refresh margin fired every 30 s;
  measured, the playlists keep serving well past the token's exp. The
  URL is now re-resolved only when mpv reports a playback failure.
- Decode images in-process with the image crate. GNOME 50's
  gdk-pixbuf hands each image to a glycin loader process.
- Read avatars from the channel object on web.kick.com browse results.
- Treat zone-less stream start times as UTC.
- Stop the desktop player when entering HTPC mode.
- Drop the TLS impersonation preference, which was never implemented.

The Flatpak builds the app with the rust-stable SDK extension from
vendored crates; CI vendors them with cargo vendor and runs the core
tests. scripts/flatpak-dev.sh builds and runs inside the SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'rust-rewrite:rust-rewrite'
git switch 'rust-rewrite'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'rust-rewrite'
git switch 'rust-rewrite'
git rebase 'main'
git switch 'main'
git merge --ff-only 'rust-rewrite'
git switch 'rust-rewrite'
git rebase 'main'
git switch 'main'
git merge --no-ff 'rust-rewrite'
git switch 'main'
git merge --squash 'rust-rewrite'
git switch 'main'
git merge --ff-only 'rust-rewrite'
git switch 'main'
git merge 'rust-rewrite'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
brian/KickClient!1
No description provided.