feat(ci): cross-compile lets-chat-desktop for Windows x86_64 #102

Merged
David merged 2 commits from feat/desktop-windows-build into main 2026-05-15 01:02:09 +02:00
Owner

Summary

Adds a Windows x86_64 build for lets-chat-desktop parallel to the existing Linux build:

  • ci-build/Dockerfile.desktop-windows sits on top of the existing rust-builder-glibc-windows base image, which already ships the mingw-w64 toolchain (gcc-mingw-w64-x86-64) and the x86_64-pc-windows-gnu Rust target, so no extra apt or rustup steps are needed. The Dockerfile only sets CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc to point rustc at the mingw cross-linker, then runs cargo build --release -p lets-chat-desktop --target x86_64-pc-windows-gnu.
  • .forgejo/workflows/build-desktop-windows.yml mirrors build-desktop-linux.yml: same paths-trigger set, same CARGO_BUILD_JOBS=nproc/2 cap, and an extract step that pulls the .exe out of the builder container via docker create + docker cp and uploads it as the lets-chat-desktop-windows-x86_64 artifact.

Wry uses WebView2 on Windows, which is accessed via Windows-RT bindings (the webview2-com crate), so no build-time GTK / WebKit / Soup libraries are required.

Test plan

  • Local smoke build: docker buildx build --tag lets-chat-desktop-windows:smoke --load -f ci-build/Dockerfile.desktop-windows . succeeds end-to-end.
  • Resulting artifact target/x86_64-pc-windows-gnu/release/lets-chat-desktop.exe exists (3.4 MB PE32+ executable).
  • On Forgejo CI the workflow uploads lets-chat-desktop-<version>-windows-x86_64.exe as an artifact.
  • The .exe opens a WebView2 window against LETS_CHAT_SERVER_URL on a Windows host (requires manual verification by a Windows user).
## Summary Adds a Windows x86_64 build for `lets-chat-desktop` parallel to the existing Linux build: - `ci-build/Dockerfile.desktop-windows` sits on top of the existing `rust-builder-glibc-windows` base image, which already ships the mingw-w64 toolchain (`gcc-mingw-w64-x86-64`) and the `x86_64-pc-windows-gnu` Rust target, so no extra apt or rustup steps are needed. The Dockerfile only sets `CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc` to point rustc at the mingw cross-linker, then runs `cargo build --release -p lets-chat-desktop --target x86_64-pc-windows-gnu`. - `.forgejo/workflows/build-desktop-windows.yml` mirrors `build-desktop-linux.yml`: same paths-trigger set, same `CARGO_BUILD_JOBS=nproc/2` cap, and an extract step that pulls the `.exe` out of the builder container via `docker create` + `docker cp` and uploads it as the `lets-chat-desktop-windows-x86_64` artifact. Wry uses WebView2 on Windows, which is accessed via Windows-RT bindings (the `webview2-com` crate), so no build-time GTK / WebKit / Soup libraries are required. ## Test plan - [x] Local smoke build: `docker buildx build --tag lets-chat-desktop-windows:smoke --load -f ci-build/Dockerfile.desktop-windows .` succeeds end-to-end. - [x] Resulting artifact `target/x86_64-pc-windows-gnu/release/lets-chat-desktop.exe` exists (3.4 MB PE32+ executable). - [ ] On Forgejo CI the workflow uploads `lets-chat-desktop-<version>-windows-x86_64.exe` as an artifact. - [ ] The `.exe` opens a WebView2 window against `LETS_CHAT_SERVER_URL` on a Windows host (requires manual verification by a Windows user).
feat(ci): cross-compile lets-chat-desktop for Windows x86_64
Some checks failed
Check / clippy + fmt + tests (pull_request) Failing after 13s
cb79c5f7c8
Adds a parallel of the desktop-linux build pipeline. ci-build/Dockerfile.desktop-windows sits on top of the existing rust-builder-glibc-windows base image (mingw-w64 toolchain + x86_64-pc-windows-gnu Rust target pre-installed), points the gnu target at the mingw linker via CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER, and builds the desktop crate via `cargo build --release --target x86_64-pc-windows-gnu`. Wry uses WebView2 on Windows, which talks over Windows-RT bindings so no extra build-time libraries are needed. The accompanying .forgejo/workflows/build-desktop-windows.yml mirrors build-desktop-linux.yml: same paths-trigger set, same nproc/2 CARGO_BUILD_JOBS cap, and an extract step that pulls the .exe out of the builder container and uploads it as lets-chat-desktop-windows-x86_64.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merge branch 'main' into feat/desktop-windows-build
Some checks failed
Check / clippy + fmt + tests (pull_request) Failing after 30s
e53038e3c8
David merged commit af963ac941 into main 2026-05-15 01:02:09 +02:00
David deleted branch feat/desktop-windows-build 2026-05-15 01:02:09 +02:00
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
psa-systems/lets-chat!102
No description provided.