Skip to content

Link the VC runtime statically into twcore.exe - #277

Merged
fylorn merged 1 commit into
mainfrom
fix/windows-static-crt
Oct 3, 2026
Merged

fylorn merged 1 commit into
mainfrom
fix/windows-static-crt

Conversation

@fylorn

@fylorn fylorn commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Why

twcore.exe (checked on the v0.58.0 release asset) imports VCRUNTIME140.dll. Windows does not ship that DLL: it comes with the Visual C++ Redistributable, usually installed by some other program. The desktop installer only carries twcore.exe and does not install the redistributable, so on a machine without it the gateway cannot start. CI runners and most real machines have it installed, which is why this never showed up.

The desktop app's own exe is not affected: the Tauri CLI links its CRT statically.

What

  • .cargo/config.toml: -C target-feature=+crt-static for cfg(all(windows, target_env = "msvc")). Setting it here, not in the workflow, means a local Windows build matches what gets released. RUSTFLAGS overrides it, so the CI test builds (-D warnings) stay dynamic. The release workflow does not set RUSTFLAGS.
  • release.yml: a new step, "No Visual C++ runtime to install". It reads both exes' imports with the MSVC dumpbin and fails if any vcruntime*, msvcp*, concrt*, vccorlib* or vcomp* DLL is still there. The runner has the runtime installed, so the existing "x64 one runs" check cannot see this. Only the import table can.

Verification

Release rehearsal (workflow_dispatch) on this branch: https://github.com/ThinkWatchProject/ThinkWatch-Core/actions/runs/37108119457

🤖 Generated with Claude Code

twcore.exe imported VCRUNTIME140.dll, which Windows does not ship: it
comes with the Visual C++ Redistributable, usually installed by some
other program. The desktop installer only carries twcore.exe, so on a
machine without the redistributable the gateway cannot start. CI runners
and most real machines have it installed, which is why nothing showed.

- .cargo/config.toml: +crt-static for windows-msvc targets, so a local
  Windows build matches what is released. RUSTFLAGS overrides it, so the
  CI test builds stay dynamic; the release workflow does not set it.
- release.yml: a step reads both exes' imports with dumpbin and fails if
  any Visual C++ runtime DLL is still there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn fylorn mentioned this pull request Oct 3, 2026
@fylorn
fylorn merged commit 20cd800 into main Oct 3, 2026
9 checks passed
@fylorn
fylorn deleted the fix/windows-static-crt branch October 3, 2026 08:19
fylorn added a commit that referenced this pull request Oct 3, 2026
Release for #276 and #277.

- Bump the workspace version to 0.59.0
- release-notes/0.59.0.md

The control-plane protocol (35) and the request store schema (25) are
already at their release values on main and do not change here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fylorn added a commit that referenced this pull request Oct 3, 2026
Release for #276 and #277.

- Bump the workspace version to 0.59.0
- release-notes/0.59.0.md

The control-plane protocol (35) and the request store schema (25) are
already at their release values on main and do not change here.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant