Skip to content

Commit 7043f5b

Browse files
docs(builds): document Windows toolchain pinning and dlltool fix
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6cf7788 commit 7043f5b

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

docs/builds.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ Runs on `ubuntu-latest`:
522522

523523
Runs on a self-hosted `[self-hosted, Windows, X64]` runner:
524524

525-
1. Sets up the Tauri build environment (Chocolatey installs cmake and rustup; `RUSTUP_TOOLCHAIN=nightly-2026-02-09` is exported to `GITHUB_ENV` and `~/.cargo/bin` is prepended to `GITHUB_PATH` to ensure the nightly toolchain takes precedence)
525+
1. Sets up the Tauri build environment (Chocolatey installs cmake and rustup; `~/.cargo/bin` is prepended to `GITHUB_PATH`; `RUSTUP_TOOLCHAIN` is set to the fully qualified `nightly-2026-02-09-x86_64-pc-windows-msvc` to ensure the MSVC-hosted toolchain is used — see [Windows Toolchain Pinning](#windows-toolchain-pinning) below)
526526
2. Installs Windows SDK for `signtool.exe`
527527
3. Generates a self-signed `CodeSigningCert` and exports to PFX
528528
4. Builds the frontend explicitly (`npm run build` in `app/frontend/`)
@@ -531,6 +531,22 @@ Runs on a self-hosted `[self-hosted, Windows, X64]` runner:
531531
7. Attaches the signed `.exe` to the same draft GitHub Release
532532
8. Cleans up the certificate and config override (runs in `always()` step)
533533

534+
#### Windows Toolchain Pinning
535+
536+
The self-hosted Windows runner can accumulate stale rustup state across runs. In particular, a system-level settings file (`C:\Windows\system32\config\systemprofile\.rustup\settings.toml`) may set `default_host_triple` to `x86_64-pc-windows-gnu`. When `RUSTUP_TOOLCHAIN` is set to a bare channel name like `nightly-2026-02-09`, rustup resolves it using the default host triple — producing the GNU-hosted toolchain, which requires `dlltool.exe` (not present on MSVC-only runners) and fails with:
537+
538+
```text
539+
error: error calling dlltool 'dlltool.exe': program not found
540+
```
541+
542+
To prevent this, the CI configuration uses three layers of defense:
543+
544+
1. **Fully qualified `RUSTUP_TOOLCHAIN`** (`taskfiles/ci.yml`): On Windows, the env var is set to `nightly-2026-02-09-x86_64-pc-windows-msvc` (with the host triple suffix), eliminating any ambiguity in toolchain resolution.
545+
546+
2. **`rustup set default-host x86_64-pc-windows-msvc`** (`.github/actions/setup-tauri-build/action.yml` and `taskfiles/ci.yml`): Run before toolchain installation to override any stale GNU default.
547+
548+
3. **Explicit `PINNED_RUST` passthrough** (`.github/actions/setup-tauri-build/action.yml`): The composite action extracts the Rust version from `.tool-versions` using PowerShell and passes it to `task ci:setup PINNED_RUST=...`, bypassing the Taskfile's `sh: grep | awk` which may fail when Git Bash utilities aren't in PATH.
549+
534550
## Linux System Dependencies
535551

536552
Tauri on Ubuntu/Debian requires these packages:

0 commit comments

Comments
 (0)