docs: add validation guide, hardware and Windows scripts, CI

Documents what the rig proved and what it found, adds the hardware sign-off
script for the Hyprland machine and an (untested) Windows validation script,
and updates CI to build the cached OBS runtime, run tests and lint the Windows
code paths.
This commit is contained in:
2026-10-08 14:31:54 +02:00
parent 9178a303ca
commit 3588d5b212
5 changed files with 362 additions and 19 deletions
+39 -15
View File
@@ -1,26 +1,34 @@
# Clipbin Desktop
An open-source game recorder for Windows and Linux, inspired by Plays.tv. Rust and GPUI provide the desktop interface; the recording engine will use libobs and official OBS capture components.
An open-source game recorder for Windows and Linux, inspired by Plays.tv. Rust and GPUI provide the desktop interface; the recording engine uses libobs and official OBS capture components.
[SPEC.md](SPEC.md) defines the agreed v1 product requirements.
## Current state
This is the initial project scaffold. It opens a native GPUI window, displays the agreed recording defaults, and always reports **Not recording**.
The recording foundation is being validated (see [docs/validation.md](docs/validation.md)). `clipbin-obs` records official OBS capture sources through one hardware encoder into keyframe-aligned segments and reports honest status; `clipbin-probe` exercises it. It passes the Linux headless rig; hardware sign-off on Hyprland and all Windows validation are still to do.
Capture, Steam detection, recording, playback, clipping, bookmarks, persistence, global hotkeys, autostart, and background recording are not implemented yet. Closing the window exits this initial shell. The full application will keep its recorder running independently of window closure, as specified in SPEC.md.
The desktop app is still the initial shell: it opens a GPUI window, displays the agreed recording defaults, and always reports **Not recording**. Steam detection, the recorder in the app, playback, clipping, bookmarks, persistence, global hotkeys, autostart, and background recording are not implemented yet.
Windows is a first-class target. Every change must keep the Windows code paths building (`cargo clippy --target x86_64-pc-windows-msvc`) and list what still needs validating on Windows.
## Layout
```text
crates/
clipbin-core/ Settings and recorder state; independent of GPUI and native OBS.
clipbin-obs/ Recording engine over the pinned libobs runtime; all unsafe code is in src/ffi.rs.
clipbin-probe/ Validation probe for capture, encoders, segments and status.
clipbin-desktop/ GPUI application and initial session-library view.
.gitea/workflows/ Rust formatting and compilation checks.
SPEC.md Product requirements and acceptance checks.
scripts/obs/ Assemble the pinned OBS runtime for Linux (built from source) and Windows (official release).
scripts/rig/ Headless Wayland/X11 desktop for capture tests on machines without a display.
scripts/validate/ Validation suites: Linux rig, Linux hardware, Windows.
docs/validation.md Validation status and findings.
.gitea/workflows/ Formatting, lint, test and Windows cross-checks.
SPEC.md Product requirements and acceptance checks.
```
The core currently has no external dependencies. Keep capture and session operations out of the UI thread when the recording engine is added.
The core has no external dependencies. Keep capture and session operations out of the UI thread.
## Development
@@ -31,9 +39,23 @@ Keep the lockfile checked in and use `--locked`. It currently pins `libc` to 0.2
On Arch/CachyOS, install the native build dependencies:
```sh
sudo pacman -S --needed base-devel pkgconf fontconfig freetype2 wayland libxcb libxkbcommon libxkbcommon-x11 openssl
sudo pacman -S --needed base-devel pkgconf fontconfig freetype2 wayland libxcb libxkbcommon libxkbcommon-x11 openssl clang
```
### OBS runtime
Clipbin bundles a pinned OBS **32.0.4** runtime (`scripts/obs/versions.env`) with only the official plugins it uses. The `libobs` crate's headers match that version; the engine refuses to start against any other.
- Linux: `scripts/obs/build-linux.sh` builds libobs and the plugins from source into `target/obs-runtime/linux-x86_64`. Arch/CachyOS build dependencies:
```sh
sudo pacman -S --needed cmake ninja extra-cmake-modules ffmpeg x264 pipewire libpulse libdrm libva jansson curl libxcomposite libxinerama libxrandr wayland-protocols simde uthash nlohmann-json mbedtls3 pciutils srt librist ffnvcodec-headers amf-headers
```
- Windows: `scripts/obs/assemble-windows.sh` (Git Bash) verifies and unpacks the official release zip into `target/obs-runtime/windows-x86_64`, copying files byte-for-byte so the Game Capture hook keeps its signature.
Development builds find the runtime through `.cargo/config.toml`; `clipbin-probe`'s build script places `obs-ffmpeg-mux` (and on Windows the OBS DLLs) next to the executable, where OBS looks for them.
On Debian/Ubuntu:
```sh
@@ -41,7 +63,7 @@ sudo apt-get update
sudo apt-get install build-essential pkg-config libfontconfig1-dev libfreetype6-dev libwayland-dev libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev libssl-dev
```
For Windows, use the MSVC Rust toolchain and Visual Studio Build Tools with the Desktop development with C++ workload. Windows support needs validation on a Windows machine.
For Windows, use the MSVC Rust toolchain and Visual Studio Build Tools with the Desktop development with C++ workload. Windows support needs validation on a Windows machine; see [docs/validation.md](docs/validation.md#windows).
Run the desktop shell from an active graphical session:
@@ -58,9 +80,13 @@ Checks:
```sh
cargo fmt --all -- --check
cargo clippy --locked --workspace --all-targets -- -D warnings
cargo build --locked --workspace
cargo test --locked --workspace
# Windows code paths, from any platform (rustup target add x86_64-pc-windows-msvc):
cargo clippy --locked --target x86_64-pc-windows-msvc -p clipbin-core -p clipbin-obs -p clipbin-probe --all-targets -- -D warnings
```
Recording validation on Linux, headless: `scripts/validate/linux-rig.sh`.
The core can also be checked without native UI dependencies:
```sh
@@ -69,14 +95,12 @@ cargo check --locked -p clipbin-core
## First recording milestone
1. Validate official OBS capture and recording-health signals on CachyOS, Hyprland and the RX 9070 XT at 1440p60.
2. Select and pin a tested OBS runtime, Rust bindings, and official plugin set together. Preserve the original signed Windows capture-hook binaries.
3. Prove one continuous hardware encoder can produce short keyframe-aligned segments and remux clips across their boundaries while recording continues.
1. Validate official OBS capture and recording-health signals on CachyOS, Hyprland and the RX 9070 XT at 1440p60. *Rig validated; hardware sign-off pending.*
2. Select and pin a tested OBS runtime, Rust bindings, and official plugin set together. Preserve the original signed Windows capture-hook binaries. *Pinned to OBS 32.0.4 and libobs crate 5.0.1; Windows runtime unvalidated.*
3. Prove one continuous hardware encoder can produce short keyframe-aligned segments and remux clips across their boundaries while recording continues. *Proven in the rig with VA-API H.264 and HEVC.*
4. Integrate the recorder without blocking GPUI, then add native playback and seeking.
OBS is not linked or bundled in this scaffold. Adding an unused native dependency would not validate the required runtime/plugin compatibility. The runtime bundle and adapter belong to the first recording milestone.
The capture integration must use official OBS components: Windows Game Capture/Window Capture, X11 Xcomposite, and Wayland PipeWire/desktop-portal capture. Third-party game hooks are excluded.
The capture integration uses official OBS components only: Windows Game Capture/Window Capture, X11 Xcomposite, and Wayland PipeWire/desktop-portal capture. Third-party game hooks are excluded.
## License