feat(javascript): publish a win32-arm64 native package - #4634
Conversation
Adds an aarch64-pc-windows-msvc build of the Node.js driver manager, built natively on GitHub-hosted windows-11-arm runners with the standard MSVC toolchain (aarch64-pc-windows-msvc is a Tier 1 Rust target as of Rust 1.91). This publishes @apache-arrow/adbc-driver-manager-win32-arm64-msvc so applications using the driver manager can run natively on Windows-on-ARM. Fixes apache#4629. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@prmoore77 (not Claude) do you have an ARM device and can you participate in release verification? I don't think anyone currently has such a device so we can't test the final binaries. |
Hi @lidavidm - yes - I use a Windows arm64 VM in Azure Cloud for testing this type of stuff. I would be glad to test this manually on there. |
|
FWIW, I also have a Windows ARM device (and a bad habit of not participating in release validation :( ). |
|
Well, the Windows script also doesn't test binaries yet (I'm building up to that in #4624), so this adds pressure on me to finish that 😔 |
| - host: windows-latest | ||
| target: x86_64-pc-windows-msvc | ||
| - host: windows-11-arm | ||
| target: aarch64-pc-windows-msvc |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Miniforge does not publish a Windows ARM64 installer, so setup-miniconda 404s on windows-11-arm. Use vcpkg (a supported ADBC_DEPENDENCY_SOURCE) to provide SQLite for the test driver build on that leg instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds Windows-on-ARM64 support to the JavaScript ADBC driver-manager by extending the native build/release matrix and introducing a new platform-specific npm package for win32-arm64-msvc.
Changes:
- Add
aarch64-pc-windows-msvcto the@napi-rs/clitarget list and configure Rust static CRT flags for that target. - Introduce a new optional dependency/package:
@apache-arrow/adbc-driver-manager-win32-arm64-msvc. - Extend GitHub Actions build/packaging workflows to build/test on
windows-11-arm, including a vcpkg-based SQLite dependency path for ARM64.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| javascript/package.json | Adds the Windows ARM64 Rust target and declares the new platform optional dependency. |
| javascript/package-lock.json | Updates the lockfile optionalDependencies list to include the new win32-arm64 package. |
| javascript/npm/win32-arm64-msvc/README.md | Adds README for the new Windows ARM64 native package. |
| javascript/npm/win32-arm64-msvc/package.json | Defines the new scoped npm package for the Windows ARM64 native addon. |
| javascript/.cargo/config.toml | Adds Windows ARM64 target rustflags (static CRT). |
| .github/workflows/packaging.yml | Adds a windows-11-arm leg to the Node.js binaries packaging matrix. |
| .github/workflows/javascript.yml | Adds windows-11-arm to build/test matrices and uses vcpkg to supply SQLite on Windows ARM64. |
Files not reviewed (1)
- javascript/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| & "$vcpkgRoot\vcpkg.exe" install sqlite3:arm64-windows-static-md | ||
| $toolchain = "$vcpkgRoot\scripts\buildsystems\vcpkg.cmake" -replace '\\', '/' | ||
| echo "ADBC_CMAKE_ARGS=-DCMAKE_TOOLCHAIN_FILE=$toolchain -DVCPKG_TARGET_TRIPLET=arm64-windows-static-md" >> $env:GITHUB_ENV |
There was a problem hiding this comment.
This is pre-existing behavior shared by every test leg, not specific to
ARM64: all five existing platform packages are also unpublished at 0.25.0,
and npm treats unresolvable optional dependencies as skippable. The ARM64
leg passed CI with the package absent from the registry.
| - name: Setup conda (Windows) | ||
| if: runner.os == 'Windows' | ||
| # Miniforge does not publish a Windows ARM64 installer, so the ARM64 | ||
| # leg gets SQLite from vcpkg below instead. | ||
| if: runner.os == 'Windows' && runner.arch != 'ARM64' | ||
| uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1 |
There was a problem hiding this comment.
With the micromamba rework, CONDA_PREFIX is now defined on the ARM64 leg
too (pointing at the micromamba env), and its Library\bin on PATH is
needed there for sqlite3.dll, so the shared step is correct for both
Windows legs.
|
It seems that micromamba release arm64 Windows binaries. Is there a possibility that this could be used as an alternative to Miniforge? |
| if: runner.os == 'Windows' && runner.arch != 'ARM64' | ||
| run: conda install -c conda-forge --file ci/conda_env_cpp.txt |
There was a problem hiding this comment.
As @eitsupi points out if we can use setup-micromamba and stay consistent that would be ideal.
There was a problem hiding this comment.
Done — the win-arm64 test leg now uses the conda-forge flow via micromamba
instead of vcpkg (562b35c). Two notes on the implementation:
mamba-org/setup-micromambais not on the ASF actions allowlist
(approved_patterns.yml
only hasconda-incubator/setup-miniconda), so the step downloads the
officialmicromamba-win-arm64.exefrom mamba-org/micromamba-releases
directly, pinned to 2.8.1-0 with a sha256 check. If you'd rather get
setup-micromambaadded to the allowlist and use the action, happy to
switch — this seemed like the lower-friction path for now.- conda-forge's
win-arm64platform doesn't havecmake,compilers,
libpq, orpkg-configyet, so the leg installs justlibsqlite(what
the test driver build needs) and uses the runner's preinstalled MSVC and
CMake rather than the fullci/conda_env_cpp.txt.
There was a problem hiding this comment.
I don't really want to work around the allowlist...we should get it added.
|
Manual verification on Windows-on-ARM done, per the release-verification question above. I took the npm tarballs built by this PR's packaging run (the So the CI-built artifacts work end-to-end on Windows arm64: addon load → driver load → TLS connect → query → Arrow results, with every component (Node, addon, driver, server) running natively on arm64. I'm happy to repeat this against the actual release candidates during release verification, I have this VM available all of the time (though it is shut down when I'm not using it for testing). |
Per review, use the conda-forge flow via micromamba (which ships native Windows ARM64 binaries) instead of vcpkg. setup-micromamba is not on the ASF actions allowlist, so download the pinned, checksummed binary from micromamba-releases directly. conda-forge's win-arm64 platform does not have cmake/compilers/libpq/pkg-config yet, so only libsqlite is installed; the runner's MSVC and CMake are used. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@lidavidm - if you would like me to run the Azure Windows arm64 VM for you - and provide credentials - just let me know... thanks. |
Fixes #4629.
Generated-by: Claude Code