Repository navigation
perf(windows): link the C runtime statically (--version 6.88 -> 6.43 ms) - #441
Merged
Merged
Conversation
With the system DLLs delay-loaded (#416), the dynamic CRT was the last thing loading before main: VCRUNTIME140 plus nine api-ms-win-crt-* DLLs. +crt-static for MSVC targets removes them. Released v0.6.36 vs this tree, interleaved, 2x300 runs: 6.88 -> 6.43 ms median, p95 7.75 -> 7.07 ms. The binary no longer needs the VC++ redistributable. Co-Authored-By: Claude Opus 5.5 <[email protected]>
mrnasil
enabled auto-merge (squash)
November 9, 2026 12:06
mrnasil
added a commit
that referenced
this pull request
Nov 9, 2026
_norm used lstrip("./"), which strips every leading '.' and '/', so
".cargo/config.toml" became "cargo/config.toml" and never matched the
.cargo/ workspace root: Test (linux) selected nothing for it (#441).
Only a leading "./" is dropped now.
Co-authored-by: Claude Opus 5.5 <[email protected]>
Merged
mrnasil
added a commit
that referenced
this pull request
Nov 9, 2026
The released binary links the CRT statically (#441). Interleaved with v0.6.36 on the same boot: 6.96 vs 7.46 ms. Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Summary
.cargo/config.toml:+crt-staticforcfg(all(windows, target_env = "msvc")). The release workflow builds from the checkout, so shipped Windows binaries pick it up.VCRUNTIME140+ nineapi-ms-win-crt-*) was the last thing loading beforemain.Measurements (Windows 11, x86_64, release,
--version, interleaved, 2×300 runs)Empty Rust
mainon the same boot: 6.7 ms dynamic, 6.3 ms static — the rest is Windows process creation.Test plan
--features bundled-sqlite(same as release.yml);dumpbin /dependents: no CRT DLLs, the eight system DLLs still delay-loadedWHYCODES_HOMEsmoke:config show,session list(createswhycodes.db),--help,__shell -c "echo hi && ls | wc -l"cli_args test_cli_help,whycodes-storage --libpass🤖 Generated with Claude Code