feat: build and publish win32-x64-msvc native binding - #88
Conversation
The generated loader already branches to @stll/aho-corasick-win32-x64-msvc, but the package was never built or published, so downstream consumers (@stll/text-search, @stll/anonymize) fail to import on Windows. Standard GitHub-hosted runners, including windows-latest, are free and unlimited for public repositories, so the build costs nothing. - Add x86_64-pc-windows-msvc to napi targets. - Add npm/win32-x64-msvc platform package (picked up by prepare-release-package.mjs into optionalDependencies). - Add windows-latest to the release build and test matrices. Verified locally with cargo check --target x86_64-pc-windows-msvc; the first full build/link runs in the next release workflow.
There was a problem hiding this comment.
Code Review
This pull request adds support for the Windows x64 MSVC platform by introducing the package configuration for @stll/aho-corasick-win32-x64-msvc and adding x86_64-pc-windows-msvc to the list of targets in the main package.json. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dadaec9083
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - target: x86_64-pc-windows-msvc | ||
| os: windows-latest |
There was a problem hiding this comment.
Include the Windows package in release package-files
Adding this target makes the pack job package the new npm/win32-x64-msvc directory via the find npm ... loop, but both reusable release workflows still receive a package-files allowlist that omits npm/win32-x64-msvc/package.json. In the pinned finalize workflow, every downloaded tarball must match that allowlist, so a publish run will either skip Windows as already released during preflight or abort in Finalize with the Windows tarball reported as an unexpected package.
Useful? React with 👍 / 👎.
Why
Windows has no native binding today: the napi-generated loader in
index.cjsalready branches to@stll/aho-corasick-win32-x64-msvc, but that package was never built or published. Downstream consumers (@stll/text-search→@stll/anonymize) therefore throw at import time on Windows.@stll/text-searchneeds all three native engines (aho-corasick, fuzzy-search, regex-set) to ship win32 binaries before Windows works end-to-end — this PR is part of that set, alongside stella/fuzzy-search#64.Windows builds were dropped previously for cost reasons. That no longer applies: standard GitHub-hosted runners — including
windows-latest— are free with unlimited minutes for public repositories (2026 Actions pricing); only "larger runners" are always billed.What
package.json: addx86_64-pc-windows-msvctonapi.targets.npm/win32-x64-msvc/package.json: new platform package, mirroringdarwin-x64.prepare-release-package.mjspicks it up automatically into the rootoptionalDependencies;version-sync checkpasses..github/workflows/release.yml: addwindows-latestto the build matrix and the post-build test matrix (artifact steps already useshell: bash).Verification
cargo check --target x86_64-pc-windows-msvcpasses locally (compile-checked; no Windows linker on macOS).node scripts/version-sync.mjs checkpasses.bun teston Windows happens in the next release workflow run — worth watching. PR CI delegates to the sharedrust-napi-ciorg workflow, unchanged here.Out of scope
win32-arm64-msvc: same pattern later if wanted (windows-11-armrunners are also free for public repos).CC on behalf of @jan-kubica