Skip to content

feat: build and publish win32-x64-msvc native binding - #88

Merged
jan-kubica merged 2 commits into
mainfrom
feat/win32-x64-builds
Jun 11, 2026
Merged

feat: build and publish win32-x64-msvc native binding#88
jan-kubica merged 2 commits into
mainfrom
feat/win32-x64-builds

Conversation

@jan-kubica

Copy link
Copy Markdown
Contributor

Why

Windows has no native binding today: the napi-generated loader in index.cjs already 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-search needs 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: add x86_64-pc-windows-msvc to napi.targets.
  • npm/win32-x64-msvc/package.json: new platform package, mirroring darwin-x64. prepare-release-package.mjs picks it up automatically into the root optionalDependencies; version-sync check passes.
  • .github/workflows/release.yml: add windows-latest to the build matrix and the post-build test matrix (artifact steps already use shell: bash).

Verification

  • cargo check --target x86_64-pc-windows-msvc passes locally (compile-checked; no Windows linker on macOS).
  • node scripts/version-sync.mjs check passes.
  • The first full build + link + bun test on Windows happens in the next release workflow run — worth watching. PR CI delegates to the shared rust-napi-ci org workflow, unchanged here.

Out of scope

  • win32-arm64-msvc: same pattern later if wanted (windows-11-arm runners are also free for public repos).

CC on behalf of @jan-kubica

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.

@gemini-code-assist gemini-code-assist Bot 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.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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".

Comment on lines +130 to +131
- target: x86_64-pc-windows-msvc
os: windows-latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@jan-kubica
jan-kubica merged commit 9ea6be5 into main Jun 11, 2026
21 checks passed
@jan-kubica
jan-kubica deleted the feat/win32-x64-builds branch June 11, 2026 11:12
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant