fix: statically link CRT on Windows - #86
Merged
Merged
Conversation
Release v0.1.0: promote dev to master
Release 0.1.1
README install polish
…edist The prebuilt Windows binary targets x86_64-pc-windows-msvc and dynamically linked the MSVC C runtime (vcruntime140.dll, api-ms-win-crt-*). On a clean Windows lacking the VC++ 2015-2022 redistributable, tslime.exe failed to launch with STATUS_DLL_NOT_FOUND (0xc0000135) — silently, producing no PowerShell error and no output, so 'tslime' appeared to do nothing. Add .cargo/config.toml forcing +crt-static for the windows-msvc target so the runtime is baked into the binary. This restores the 'zero runtime dependencies, single static binary' guarantee on Windows (the Linux musl build is already static) and covers both the release pipeline and 'cargo install' from source. Also harden the README PowerShell install snippet to handle an unset User Path (avoids writing a leading ';' into PATH).
Windows static-CRT fix (see CHANGELOG).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Windows install instructions silently fail: typing
tslimein a new PowerShell produces no error and no output.Root cause
The prebuilt Windows binary targets
x86_64-pc-windows-msvcand dynamically linked the MSVC C runtime (vcruntime140.dll,api-ms-win-crt-*). On a clean Windows without the VC++ 2015–2022 redistributable,tslime.exefails to launch withSTATUS_DLL_NOT_FOUND(0xc0000135). PowerShell shows nothing for a failed image load, so the command appears to do nothing. (A PATH problem would instead printnot recognized.)Also contradicted the README's "zero runtime dependencies, single static binary" claim — true on Linux (musl) but not Windows.
Fix
.cargo/config.tomlforcing+crt-staticfor thewindows-msvctarget. Bakes the runtime into the binary; covers both the release pipeline andcargo installfrom source.Path(avoids a leading;).Test plan
cargo metadataparses the new config; macOS/Linux builds unaffected (config scoped to the windows-msvc target only).tslime.exelaunches the TUI on a clean Windows VM (no VC++ redist).