xcl-gui: a window to run XCL, read its log, edit settings and update #1719

Open
github-bot wants to merge 8 commits from github-bot/gh-1719 into main AGit
Owner

@⁠nikitronick-crypto on GitHub · 2026-11-24 19:46 UTC · original
nikitronick-crypto:xcl-gui → main · +6076 −156 · 7 files · 8 commits · open

A window for people who would rather not use a command line: pick the game once, press Play, read what XCL prints and its xcl.log as they grow, edit the title's xcl.toml, and precompile the game's shaders. It is a program of its own (crates/xcl-gui) that runs xcl run <game> and xcl shaders … --precompile from outside: nothing of XCL's runtime is linked or changed, and no existing file is touched except the workspace's member list and Cargo.lock.

Opened to ask first whether a GUI is wanted in the tree at all. It is far over the size target (3 198 lines without Cargo.lock): if it is wanted I will split it into stacked PRs (logic and its tests, the process runner, the window, the settings pages, update and build, the precompile pass). If it is not, it stays in my fork and this can be closed.

Related: #1500 adds a WinForms developer launcher with presets. This one is aimed at running and watching a title rather than at debug presets: live console and log, an errors page, and the title's xcl.toml. I am glad to fold the useful parts into that work instead.

What is in it

  • crates/xcl-gui/src/logic.rs: log-line severity, xcl.toml edits that keep comments and unknown keys (toml_edit), the window's settings, English and Spanish texts, reading the precompile pass's reports and the time left, with tests
  • crates/xcl-gui/src/runner.rs: starting a program, its output line by line, following a log file, stopping it with what it started, with tests
  • crates/xcl-gui/src/main.rs: the window (egui): home page, console, log, errors, settings, and an XCL page that runs git pull and cargo build -p xcl with a progress bar
  • crates/xcl-gui/README.md, Cargo.toml (new workspace member), Cargo.lock

New since the first push:

  • Precompile shaders, on the home page under Play: runs xcl shaders <package> --precompile --pipelines [--used-only] (--only cs by a switch) with a progress bar, the time left and Stop. The home page says when a pass last ran to its end. An update compares the shader translators' files (crates/xcl/src/gpu, crates/xcl/build.rs) before and after git pull and says when the pass has to be run again.
  • Selecting and copying lines of the console and the logs: click, Shift+click, drag, Ctrl+A, Ctrl+C. eframe's clipboard feature was missing, so nothing reached the system clipboard before.
  • Three themes: the colours of the pictures in assets/readme (the default), black, and light.
  • main is merged in, which resolves the Cargo.lock conflict.
  • A run stopped from the window now ends as "Stopped from this window" (the slip noted in the first description).

Tested

  • head 6fa6d6f, no uncommitted changes, NVIDIA GeForce RTX 3080 Ti (12084 MiB dedicated, driver 621.24 / 32.0.16.2124), AMD Ryzen 5 7500F, Windows, Rust 1.100.0 (0ef1bc386 2026-11-09):
    • cargo test --workspace -- --test-threads=4 (debug): 1268 passed, 0 failed, 46 ignored. The 18 tests of xcl-gui are among them.
    • SKIPPED, 27 lines: 20 "no wave64" (in gpu::recomp::lower, lower_dxil and gpu::recomp::tests, among them gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware); 3 "wave32, per-lane form: refused" (f16_programs_on_the_gpu twice, f32_programs_on_the_gpu once); pso_measurement_compiles_an_exact_synthetic_record (Windows Developer Mode is required); test_title_draws_with_a_root_signature_under_the_debug_layer (no d3d12SDKLayers.dll); uploads_start_from_each_subresources_state (no D3D12 debug layer); heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)
    • cargo build --release, and the window opened
  • same PC, the window built from earlier commits of this branch, with a real title:
    • 32087fa: a whole precompile pass from the window (26 503 shaders, and the compute pipelines earlier runs used), followed to its end with its bar and time left. In the title's next run, started from the window, the log shows 70 pipelines with "driver blob supplied" in the first minute, and the title's window showed "compiling shaders: … 67 done" where the run before the pass showed 227.
    • 6151401: Play, the console and xcl.log followed live, Stop, the title's settings page on its real xcl.toml, update and build
  • on Linux, with a stand-in for xcl.exe: the 18 tests, the pages in the three themes, the precompile pass with its bar, stopping it, the update check with and without a change of the translators, and selecting lines (click, Shift+click, drag with scrolling, Ctrl+A) and copying them to the X clipboard
  • on Windows: selecting and copying lines, the black and light themes, and the warning after an update that changes the shader translators

Regression run

Same title, 60 s each, RTX 3080 Ti, one run after the other. This PR does not change the runtime's code (outside its own crate only Cargo.toml and Cargo.lock), so the difference between the two is run-to-run variation, not an effect of this change.

main:

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: NVIDIA GeForce RTX 3080 Ti
title: 9a60a330
seconds: 60
exit: 0x0
frames shown: 1292 (PresentX 1292)
presents per 2 s (last 3): 4 3 6
device removals: 0
crashes: 0
peak commit: 25890 MB

PR:

xcl-smoke v1
commit: 6fa6d6ff044311decbe651f4f51bce93d44dc666
gpu: NVIDIA GeForce RTX 3080 Ti
title: 9a60a330
seconds: 60
exit: 0x0
frames shown: 1583 (PresentX 1583)
presents per 2 s (last 3): 60 59 27
device removals: 0
crashes: 0
peak commit: 17061 MB

Not tested

  • a precompile pass with --used-only unticked (every compute pipeline) from the window
  • the Intel Iris Xe PC of the first push was not run again at this head
  • the licences of the transitive dependencies of eframe / rfd (and now arboard, for the clipboard) against GPL-2.0-only (the direct dependencies are MIT or MIT / Apache-2.0)
  • AMD and other NVIDIA cards

AI use

  • Claude Code with Claude Fable 5.2 wrote the code, its tests and this description. I built it, ran the tests and the regression runs, and used the window with a title on my PC.

🤖 Generated with Claude Code

**@⁠nikitronick-crypto** on GitHub · 2026-11-24 19:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/1719) `nikitronick-crypto:xcl-gui` → `main` · +6076 −156 · 7 files · 8 commits · open A window for people who would rather not use a command line: pick the game once, press Play, read what XCL prints and its `xcl.log` as they grow, edit the title's `xcl.toml`, and precompile the game's shaders. It is a program of its own (`crates/xcl-gui`) that runs `xcl run <game>` and `xcl shaders … --precompile` from outside: nothing of XCL's runtime is linked or changed, and no existing file is touched except the workspace's member list and `Cargo.lock`. Opened to ask first whether a GUI is wanted in the tree at all. It is far over the size target (3 198 lines without `Cargo.lock`): if it is wanted I will split it into stacked PRs (logic and its tests, the process runner, the window, the settings pages, update and build, the precompile pass). If it is not, it stays in my fork and this can be closed. Related: #1500 adds a WinForms developer launcher with presets. This one is aimed at running and watching a title rather than at debug presets: live console and log, an errors page, and the title's `xcl.toml`. I am glad to fold the useful parts into that work instead. **What is in it** - `crates/xcl-gui/src/logic.rs`: log-line severity, `xcl.toml` edits that keep comments and unknown keys (`toml_edit`), the window's settings, English and Spanish texts, reading the precompile pass's reports and the time left, with tests - `crates/xcl-gui/src/runner.rs`: starting a program, its output line by line, following a log file, stopping it with what it started, with tests - `crates/xcl-gui/src/main.rs`: the window (egui): home page, console, log, errors, settings, and an XCL page that runs `git pull` and `cargo build -p xcl` with a progress bar - `crates/xcl-gui/README.md`, `Cargo.toml` (new workspace member), `Cargo.lock` New since the first push: - **Precompile shaders**, on the home page under Play: runs `xcl shaders <package> --precompile --pipelines [--used-only]` (`--only cs` by a switch) with a progress bar, the time left and Stop. The home page says when a pass last ran to its end. An update compares the shader translators' files (`crates/xcl/src/gpu`, `crates/xcl/build.rs`) before and after `git pull` and says when the pass has to be run again. - **Selecting and copying lines** of the console and the logs: click, Shift+click, drag, Ctrl+A, Ctrl+C. `eframe`'s `clipboard` feature was missing, so nothing reached the system clipboard before. - **Three themes**: the colours of the pictures in `assets/readme` (the default), black, and light. - `main` is merged in, which resolves the `Cargo.lock` conflict. - A run stopped from the window now ends as "Stopped from this window" (the slip noted in the first description). **Tested** - head `6fa6d6f`, no uncommitted changes, NVIDIA GeForce RTX 3080 Ti (12084 MiB dedicated, driver 621.24 / 32.0.16.2124), AMD Ryzen 5 7500F, Windows, Rust 1.100.0 (0ef1bc386 2026-11-09): - `cargo test --workspace -- --test-threads=4` (debug): 1268 passed, 0 failed, 46 ignored. The 18 tests of `xcl-gui` are among them. - SKIPPED, 27 lines: 20 "no wave64" (in `gpu::recomp::lower`, `lower_dxil` and `gpu::recomp::tests`, among them `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`); 3 "wave32, per-lane form: refused" (`f16_programs_on_the_gpu` twice, `f32_programs_on_the_gpu` once); `pso_measurement_compiles_an_exact_synthetic_record` (Windows Developer Mode is required); `test_title_draws_with_a_root_signature_under_the_debug_layer` (no d3d12SDKLayers.dll); `uploads_start_from_each_subresources_state` (no D3D12 debug layer); `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows) - `cargo build --release`, and the window opened - same PC, the window built from earlier commits of this branch, with a real title: - `32087fa`: a whole precompile pass from the window (26 503 shaders, and the compute pipelines earlier runs used), followed to its end with its bar and time left. In the title's next run, started from the window, the log shows 70 pipelines with "driver blob supplied" in the first minute, and the title's window showed "compiling shaders: … 67 done" where the run before the pass showed 227. - `6151401`: Play, the console and `xcl.log` followed live, Stop, the title's settings page on its real `xcl.toml`, update and build - on Linux, with a stand-in for `xcl.exe`: the 18 tests, the pages in the three themes, the precompile pass with its bar, stopping it, the update check with and without a change of the translators, and selecting lines (click, Shift+click, drag with scrolling, Ctrl+A) and copying them to the X clipboard - on Windows: selecting and copying lines, the black and light themes, and the warning after an update that changes the shader translators **Regression run** Same title, 60 s each, RTX 3080 Ti, one run after the other. This PR does not change the runtime's code (outside its own crate only `Cargo.toml` and `Cargo.lock`), so the difference between the two is run-to-run variation, not an effect of this change. main: ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: NVIDIA GeForce RTX 3080 Ti title: 9a60a330 seconds: 60 exit: 0x0 frames shown: 1292 (PresentX 1292) presents per 2 s (last 3): 4 3 6 device removals: 0 crashes: 0 peak commit: 25890 MB ``` PR: ``` xcl-smoke v1 commit: 6fa6d6ff044311decbe651f4f51bce93d44dc666 gpu: NVIDIA GeForce RTX 3080 Ti title: 9a60a330 seconds: 60 exit: 0x0 frames shown: 1583 (PresentX 1583) presents per 2 s (last 3): 60 59 27 device removals: 0 crashes: 0 peak commit: 17061 MB ``` **Not tested** - a precompile pass with `--used-only` unticked (every compute pipeline) from the window - the Intel Iris Xe PC of the first push was not run again at this head - the licences of the transitive dependencies of `eframe` / `rfd` (and now `arboard`, for the clipboard) against GPL-2.0-only (the direct dependencies are MIT or MIT / Apache-2.0) - AMD and other NVIDIA cards **AI use** - [Claude Code](https://claude.com/claude-code) with Claude Fable 5.2 wrote the code, its tests and this description. I built it, ran the tests and the regression runs, and used the window with a title on my PC. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A program of its own that drives xcl.exe from outside: a home page with
the game and its Play button, the console and xcl.log followed live
(errors and warnings on a page of their own), the title's xcl.toml and
the per-run switches, and updating and building XCL with a progress bar.
English and Spanish, dark and light themes. Nothing of XCL's runtime is
linked or changed.

Its tests pass on Windows and Linux; the window builds and opens on
Windows. Not yet run with a real title.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGbT9fA4dEjvKbZH8YDcL2
Cargo.lock conflicted: main's lock is taken and the packages of xcl-gui are
added to it again by cargo.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGbT9fA4dEjvKbZH8YDcL2
Precompile shaders (Home, under Play, and the XCL page) runs
xcl shaders <package> --precompile --only cs --pipelines [--used-only],
with a progress bar that says the pipelines built and the time left, and
Stop beside it. An update compares the shader translators' files before
and after git pull and says when the pass has to be run again.

Lines of the console and the logs can be selected (click, Shift+click,
drag with scrolling, Ctrl+A) and copied (Ctrl+C, Copy selection); eframe's
clipboard feature was missing, so nothing reached the system clipboard.

A run stopped from the window no longer reads 'Exited with stopped from
this window'.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGbT9fA4dEjvKbZH8YDcL2
The dark theme takes its colours from assets/readme: night blue to indigo
ground, panels of white at a few percent, violet and cyan, the XCL mark
drawn as the banner draws it, and the banner's ground behind the game's
box on Home.

Precompile shaders is on Home only, under Play; the XCL page keeps its
choices. A failed git or cargo step ends as its exit code, not as a game's
'XCL could not start the game'.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGbT9fA4dEjvKbZH8YDcL2
Such a pass may report no shaders at all (they are translated already), so
its bar stayed at 'starting'. It names the pipelines it set out to build:
the bar follows the pipelines made of that count, with the time left from
the speed between their reports.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGbT9fA4dEjvKbZH8YDcL2
The Settings and XCL pages stand in titled panels like Home's, and the
lines of the console and the logs in a box of their own. The theme button
goes round three: the project's colours, black (no colour at all) and
light; settings from before read as they did.

The status dot is drawn (the fonts have none), and warnings are darker on
the light theme.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGbT9fA4dEjvKbZH8YDcL2
The pass ran with --only cs, so a title still compiled its vertex and
pixel shaders itself, on a black screen ('compiling shaders: N running' in
its window's title). --only cs is now left out unless a switch on the XCL
page asks for compute alone; --used-only goes on choosing the compute
pipelines built. The bar follows the pipelines only in a pass of compute
alone.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGbT9fA4dEjvKbZH8YDcL2
A pass that ran to its end is kept in the settings (when, and its own
count of shaders compiled, found in the cache and failed, and pipelines
built) and said under the button, until an update makes it stale.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TGbT9fA4dEjvKbZH8YDcL2
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:02:37 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 22:28 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 22:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1719#issuecomment-7146278799) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. Thanks!
Author
Owner

@⁠nikitronick-crypto on GitHub · 2026-11-25 14:42 UTC · original

Captura de pantalla 2026-11-25 095612 Captura de pantalla 2026-11-25 095705 Captura de pantalla 2026-11-25 095541 Captura de pantalla 2026-11-25 095634 Captura de pantalla 2026-11-25 095654 Captura de pantalla 2026-11-25 112245
**@⁠nikitronick-crypto** on GitHub · 2026-11-25 14:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/1719#issuecomment-7165681231) <img width="1126" height="778" alt="Captura de pantalla 2026-11-25 095612" src="https://github.com/user-attachments/assets/205de85e-0a38-44b9-9908-9ac81b98d9b1" /> <img width="1515" height="999" alt="Captura de pantalla 2026-11-25 095705" src="https://github.com/user-attachments/assets/db95e084-a3dd-4a35-a120-c7c8e7ae71d7" /> <img width="1138" height="787" alt="Captura de pantalla 2026-11-25 095541" src="https://github.com/user-attachments/assets/4333374a-911f-4337-aa31-28dc1348352d" /> <img width="1156" height="789" alt="Captura de pantalla 2026-11-25 095634" src="https://github.com/user-attachments/assets/4e52bac8-95fc-4ac3-beb9-bd8c64b3b5a5" /> <img width="1534" height="994" alt="Captura de pantalla 2026-11-25 095654" src="https://github.com/user-attachments/assets/2cfe7ec7-34fd-497b-8f0f-6964aa448d83" /> <img width="1423" height="811" alt="Captura de pantalla 2026-11-25 112245" src="https://github.com/user-attachments/assets/442a0b9e-0639-45cb-8c29-d111207c67a4" />
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 06:17 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 06:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/1719#issuecomment-7184277655) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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 '+refs/pull/1719/head:github-bot/gh-1719'
git switch 'github-bot/gh-1719'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1719'
git switch 'github-bot/gh-1719'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1719'
git switch 'github-bot/gh-1719'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1719'
git switch 'main'
git merge --squash 'github-bot/gh-1719'
git switch 'main'
git merge --ff-only 'github-bot/gh-1719'
git switch 'main'
git merge 'github-bot/gh-1719'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.