Skip to content

Update node to v24. Add support for Windows arm64 node binary build and publish. Update Linux node binary to be built on ubuntu 24.04#3760

Merged
acalcutt merged 108 commits intomaplibre:mainfrom
WifiDB:test-arm-node
Sep 20, 2025
Merged

Update node to v24. Add support for Windows arm64 node binary build and publish. Update Linux node binary to be built on ubuntu 24.04#3760
acalcutt merged 108 commits intomaplibre:mainfrom
WifiDB:test-arm-node

Conversation

@acalcutt
Copy link
Copy Markdown
Collaborator

@acalcutt acalcutt commented Aug 26, 2025

This PR updates node current version to v24 and adds a windows arm64 binary to the build. It also updates the Linux binary to ubuntu 24.04. It includes changes from #3759 and changes from #3692 with some of the (Get-VendorPackages.ps1) changes reverted.

Closes #3687

This PR does the following

  1. Updates the built node versions to node 20, 22, and 24 . Note that node 18 was removed because it is no longer supported and also did not seem to have node build candidates for windows arm64

  2. Updates NAN to 2.23.0 to support node v24

  3. Reverts the change to use @mapbox/node-pre-gyp and points back to my @acalcutt/node-pre-gyp. This is to allow node-pre-gyp to work in node v24. The fix has been committed in the main branch of @mapbox/node-pre-gyp , but as noted in v2.0.1 did not properly release on npm mapbox/node-pre-gyp#907 we can't seem to get anyone who has permission to get a new version published there. It could make sense in the future to make a @maplibe version of node-pre-gyp instead of using my version.

  4. Adds presets for Linux and windows node builds in CMakePresets.json like existed for macOS already. Builds upon Windows Arm64 presets  #3692 form windows arm64 node version.

  5. For windows arm64 workflows, "ilammy/msvc-dev-cmd" was changed to add "arch: amd64_arm64" option, which sets VSCMD_ARG_TGT_ARCH environment variable and allows 'Get-VendorPackages.ps1' to built for the proper arm64 target/triplet. Without doing this Get-VendorPackages.ps1 was picking an x64 triplets.

  6. I added some debug information to the windows triplet files to help understand what was going on with the builds. At first it was hard to tell the VSCMD_ARG_TGT_ARCH was causing the wrong triplet to be loaded, which cause it to build for the wrong platform. This shows in the configure step on windows, like

image
  1. Updated platform/node/cmake/module.cmake to add support for windows arm64

  2. Removes some old workarounds from the workflow which no longer seem to be needed, like setting a specific cmake version and strawberry perl fixes.

  3. Updated version of boost to fix a lot of "[The contents of are available only with C++23 or later.] warnings I was seeing in the windows arm64 build. I found in Visual Studio compiler warning The contents of <stdfloat> are available only with C++23 or later. lballabio/QuantLib#1827 that error existed in boost 1.83, which is what version our maplibre-native boost package was tacked to, and was fixed in 1.84. https://github.com/maplibre/maplibre-gl-native-boost was already updated to 1.86, so I just updated to that latest commit.

  4. When running tests on windows arm, the version of pal1000/mesa-dist-win was failing because that mesa3d release is not compatible with arm. I changed this to use mmozeiko/build-mesa for windows arm tests, which was suggested for arm64 on the pal1000 release

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 27, 2025

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0% +2.02Ki  +0.0%    +884    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-3760-compared-to-main.txt

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +45% +51.9Mi  +445% +26.6Mi    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-3760-compared-to-legacy.txt

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 27, 2025

Benchmark Results ⚡

Benchmark                                                     Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                            +0.0024         +0.0022             0             0             0             0

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-3760-compared-to-main.txt

@acalcutt
Copy link
Copy Markdown
Collaborator Author

Can anyone approve this? Also, @louwers there are two failing tests that i don't think are related to this PR as I see them failing elsewhere

I did have one final question about the presets. Do you think the presets should include "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" or should that be added in the workflow?

@github-actions github-actions bot added documentation Improvements or additions to documentation build Related to build, configuration or CI/CD node github_actions Pull requests that update GitHub Actions code windows labels Sep 19, 2025
@louwers louwers requested a review from Copilot September 19, 2025 18:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates Node.js support to versions 20, 22, and 24 while removing support for Node 18, and adds Windows ARM64 binary builds to the CI/CD pipeline. The changes enable MapLibre Native to support newer Node.js versions and expand platform compatibility.

  • Updates Node.js target versions from 18, 20, 22 to 20, 22, 24
  • Adds Windows ARM64 build support with new CI workflows and CMake presets
  • Updates Linux builds to use Ubuntu 24.04 instead of 22.04

Reviewed Changes

Copilot reviewed 12 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
platform/node/scripts/publish.sh Updates Node.js target versions in build script
platform/node/package.json Updates version, dependency, and Node engine requirements
platform/node/cmake/module.cmake Adds Windows ARM64 architecture detection
platform/node/README.md Updates documentation for platform support
platform/node/CMakeLists.txt Updates minimum Node ABI and NAN version
platform/node/CHANGELOG.md Documents changes for new version
platform/node/.nvmrc Updates Node version to 24
docs/mdbook/src/platforms/windows/build-msvc-arm64.md Adds comprehensive Windows ARM64 build documentation
CMakePresets.json Adds presets for Linux, Windows, and Windows ARM64 node builds
.github/workflows/node-release.yml Updates CI to support Ubuntu 24.04 and Windows ARM64
.github/workflows/node-ci.yml Updates CI workflows with ARM64 support and new test configurations
.github/actionlint.yaml Updates runner configuration for new platforms
Files not reviewed (1)
  • platform/node/package-lock.json: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Copy Markdown
Member

@louwers louwers left a comment

Choose a reason for hiding this comment

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

I can't really review the Windows stuff...

So... LGTM. I'll get it merged, will look into the linux workflow.

@louwers
Copy link
Copy Markdown
Member

louwers commented Sep 19, 2025

#3825 wil probably fix linux-ci

@acalcutt acalcutt merged commit 6ee5505 into maplibre:main Sep 20, 2025
44 of 48 checks passed
nnhubbard pushed a commit to nnhubbard/maplibre-native that referenced this pull request Oct 12, 2025
…to cachly-production-v2

* 'main' of https://github.com/maplibre/maplibre-native: (186 commits)
  [node] Add options parameter to addImage method in Node.js type definitions (maplibre#3868)
  Fix .gitmodules submodule names to match actual paths after vendor reorganization (maplibre#3860)
  Fix warnings in MapLibre iOS example app (maplibre#3857)
  Handle style builder exceptions (maplibre#3855)
  Release MapLibre Android 12.0.0 (maplibre#3853)
  Bump minimum Android SDK version from 21 to 23 (maplibre#3849)
  Add --actionJournalDir argument to glfw binary (maplibre#3852)
  Fix crash in camera position (maplibre#3847)
  docs: remove `@param` for property (maplibre#3843)
  Ios 6 19 1 (maplibre#3846)
  Release MapLibre iOS 6.19.0 (maplibre#3845)
  Remove bazel-out from xcframework (maplibre#3841)
  fix misplaced LineOffset and LineGapWidth (maplibre#3840)
  Add validate-backend-options.cmake script (maplibre#3828)
  Manually free bound resources (maplibre#3831)
  Move dependencies from maplibre-native-base to vendor (maplibre#3829)
  chore(security): configure dependency cooldown settings (maplibre#3824)
  Bump taiki-e/install-action from 2.61.7 to 2.62.1 in the github-actions group (maplibre#3826)
  Update node to v24. Add support for Windows arm64 node binary build and publish. Update Linux node binary to be built on ubuntu 24.04 (maplibre#3760)
  fix linux-ci (maplibre#3825)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Related to build, configuration or CI/CD documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code node windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows arm64 presets

4 participants