Skip to content

Statically link the Windows C runtime - #23

Merged
254808127 merged 1 commit into
mainfrom
fix/windows-static-crt
Aug 18, 2026
Merged

Statically link the Windows C runtime#23
254808127 merged 1 commit into
mainfrom
fix/windows-static-crt

Conversation

@254808127

Copy link
Copy Markdown
Collaborator

Summary

  • statically link the MSVC C runtime for the Windows x64 target
  • add a Windows release-build CI job that executes the CLI
  • reject release binaries importing VCRUNTIME or MSVCP DLLs

Why

The published v1.1.12 Windows binary fails on a clean Windows x64 machine with exit code 0xC0000135. Its PE import table includes VCRUNTIME140.dll, so both the Skill bootstrap and @lexmount/dsh-browser download a checksum-valid executable that cannot start unless the user separately installs the Visual C++ Redistributable.

Target-specific crt-static flags make the Windows artifact self-contained without changing the macOS build. The new CI job exercises the release build and inspects its import table to prevent regression.

Validation

  • git diff --check
  • reproduced v1.1.12 startup failure on Windows x64
  • confirmed VCRUNTIME140.dll in the published executable's PE imports
  • CI builds/tests the patched x86_64-pc-windows-msvc target and verifies its runtime dependencies

@254808127
254808127 requested a lite review from Copilot August 18, 2026 09:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a Windows “release” validation path to CI and configures Rust builds for MSVC to use a statically linked CRT, aiming to ensure the produced browser-cli.exe runs without requiring the Visual C++ Redistributable.

Changes:

  • Add a new windows-release GitHub Actions job to build/test a Windows MSVC release binary and inspect its DLL dependencies.
  • Add .cargo/config.toml to enable +crt-static for x86_64-pc-windows-msvc.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/ci.yml Adds a Windows release job with a dependency check for dynamic VC++ runtime DLLs.
.cargo/config.toml Forces static CRT linking for the Windows MSVC target used by the new CI job.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci.yml
- name: Verify standalone Windows executable
shell: powershell
run: |
$binary = "target/x86_64-pc-windows-msvc/release/browser-cli.exe"
Comment thread .github/workflows/ci.yml
Comment on lines +103 to +106
$installationPath = & $vswhere -latest -property installationPath
Import-Module "$installationPath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath $installationPath -SkipAutomaticLocation
$dependencies = & dumpbin.exe /dependents $binary
@254808127
254808127 merged commit ecb7116 into main Aug 18, 2026
3 checks passed
@254808127 254808127 mentioned this pull request Aug 18, 2026
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.

2 participants