Skip to content

Make: Build JavaScript Windows x64 prebuilds - #774

Merged
ashvardanian merged 2 commits into
unum-cloud:main-devfrom
GraDea:pr/windows-node-prebuilds
Jul 10, 2026
Merged

ashvardanian merged 2 commits into
unum-cloud:main-devfrom
GraDea:pr/windows-node-prebuilds

Conversation

@GraDea

@GraDea GraDea commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This PR enables Windows x64 Node.js prebuilds for the usearch npm package.

The Issue

Currently, the usearch npm tarball lacks Windows prebuilds (e.g., prebuilds/win32-x64/usearch.node), causing require("usearch") to fail on Windows environments. The package.json and javascript/usearch.ts files are already configured to handle Windows prebuilds, but the build_javascript CI job had Windows commented out.

The Fix

  • Added windows-2022 to the build_javascript OS matrix.
  • Narrowed the arch matrix to [x64] and removed the redundant exclude block (since x86 was already excluded for both macOS and Ubuntu).

Verification

To ensure this works without breaking the release pipeline, a safe fork-only smoke test was run on windows-2022. The smoke test confirmed:

  1. npm run prebuild-single compiles successfully on Windows x64.
  2. npm pack correctly includes package/prebuilds/win32-x64/usearch.node in the generated tarball.
  3. A fresh project can install the packed tarball and successfully execute require('usearch').

Smoke test evidence: https://github.com/GraDea/USearch/actions/runs/29040426768

GraDea and others added 2 commits July 9, 2026 19:28
The `build_javascript` job exported `CC=gcc`/`CXX=g++` for every OS. On
Windows `node-gyp` ignores both and builds with MSVC, but NumKong's ISA
probe reads the compiler from `$CC` while still emitting MSVC flag
syntax, so it shells out to `gcc /c /arch:AVX2 ... /nologo`. Every probe
fails, the failures are swallowed, and `nk_probes.h` lands with all 39
`NK_TARGET_*` set to zero.

The addon still builds and passes the test suite -- dynamic dispatch just
has no kernels to choose from -- so the result is a scalar-only binary
shipped to every Windows npm user. Scope the variables to the Linux step
and let the probe fall back to `cl.exe`, which enables Haswell and
Skylake.
@ashvardanian
ashvardanian changed the base branch from main to main-dev July 10, 2026 13:46
@ashvardanian
ashvardanian merged commit 7240652 into unum-cloud:main-dev Jul 10, 2026
@ashvardanian

Copy link
Copy Markdown
Member

Thank you, @GraDea! Sorry it took a bit of time. I'm finalising new NumKong/StringZilla/ForkUnion releases to feed into USearch v3.

ashvardanian pushed a commit that referenced this pull request Jul 10, 2026
### Minor

- Add: Expose `stats()` in Rust SDK (#768) (3713af9)
- Add: Rust compact binding (#771) (749d03b)

### Patch

- Make: Modernize CI toolchains, pin cibuildwheel (017fad3)
- Fix: Reclaim `slot_lookup_` tombstones under churn (#769) (c6d634c)
- Fix: Mix integer key hashes with SplitMix64 (#773) (9fc3500)
- Make: Build JavaScript Windows x64 prebuilds (#774) (7240652)
- Make: Bundle NumKong runtime with C# native artifacts (9c0ed29)
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