Skip to content

feat: native addons from prebuilt binaries, no compiler at install time - #2938

Merged
rolljee merged 2 commits into
2-devfrom
feat/prebuilt-native-addons
Sep 26, 2026
Merged

rolljee merged 2 commits into
2-devfrom
feat/prebuilt-native-addons

Conversation

@rolljee

@rolljee rolljee commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Closes #2839. Closes #2790 (the CI npm ci flake it caused) once green.

What

Dependency Before After
dumpme 2.0.0 (NAN, compiled at install) 2.1.0-dev.1 — kuzzleio/dumpme#6
koncorde 4.7.0 4.8.0-beta.1 — kuzzleio/koncorde#83
↳ boost-geospatial-index 1.4.0 (NAN) 1.5.0-beta.1 — kuzzleio/boost-geospatial-index#27
↳ kuzzle-espresso-logic-minimizer 2.2.0 (NAN) 2.3.0-beta.1 — kuzzleio/espresso-logic-minimizer#2

The three addons are N-API ports shipping prebuilt binaries (linux-x64/arm64 on glibc ≥ 2.31, darwin-x64/arm64) inside their tarballs: npm install compiles none of them and downloads no Node headers. Elsewhere (Alpine, other arches) they still compile, as before. Pinned exactly while they are prereleases; they move to stable before 2.57.0 does.

Behavior: each addon's CI runs a seeded differential test against its previous (NAN) release and requires identical output. boost's C++ standard is now pinned to gnu++17: 1.4.0 inherited it from the Node headers, and its Node 24 build (gnu++20) returned different geospatial results on arm64 — all builds now behave like the Node 20/22 one (documented in the upgrade notes).

CI

  • .ci/scripts/check-prebuilt-addons.sh (in build, after npm ci): fails if any of the three was compiled instead of loaded from prebuilds/. Checked locally both ways (passes on a clean install, fails on a simulated compile).
  • install-packages action removed with its 16 call sites: it only installed libunwind, which nothing links since node-segfault-handler was dropped (dumpme never linked it).
  • with-retry.sh stays, for re2's install-time download (comment updated; TD-83 follow-up in the register).

Verified locally

  • pr-preflight ✅ · unit tests in Docker ✅ (3 908 passed, 159 files) · containerised npm ci: 0 compile lines.
  • Functional suites: not run locally (port 7512 taken by another local stack) — this PR's CI runs the full matrix.
  • Client Docker images (template-kuzzle-project pattern: build in kuzzle-runner, run in node:*-slim), kuzzle@2.56.0 vs this branch, linux/amd64 and linux/arm64:
Flow 2.56.0 this PR
kuzzle-runner:24-trixie-slim → node:24-trixie-slim 3 addons compiled, kuzzle loads, geo + espresso filters match 3 addons prebuilt, kuzzle loads, geo + espresso filters match
kuzzle-runner:22-trixie-slim → node:22-trixie-slim (arm64) — 3 addons prebuilt, kuzzle loads, filters match
kuzzle-runner:22 → node:22-bookworm-slim, :20 → node:20-bookworm-slim kuzzle does not load (GLIBC_2.38 not found, uWS) same, unchanged — see below; addons prebuilt

No Dockerfile change is needed.

⚠️ Pre-existing, unrelated to this PR: since 2.50.0, uWebSockets.js 20.56.0 requires glibc 2.38 (GLIBC_2.38 not found … uws_linux_*_127.node), so Kuzzle does not load on node:*-bookworm-slim (glibc 2.36) — a runtime image ~20 client Dockerfiles use. Trixie (2.41) is fine. To be tracked separately.

🤖 Generated with Claude Code

rolljee and others added 2 commits September 26, 2026 21:23
dumpme 2.0.0 → 2.1.0-dev.1 and koncorde 4.7.0 → 4.8.0-beta.1, which brings
boost-geospatial-index 1.5.0-beta.1 and kuzzle-espresso-logic-minimizer
2.3.0-beta.1. All three addons are now N-API ports that ship prebuilt
binaries for linux-x64/arm64 (glibc 2.31+) and darwin-x64/arm64 inside their
tarballs, so `npm install` compiles none of them and downloads no Node
headers; each was proven identical to its previous release by a seeded
differential test in its own CI. Pinned exactly while they are prereleases.

CI:
- check-prebuilt-addons.sh, run in the `build` job after `npm ci`, fails if
  any of the three was compiled instead of loaded from its prebuild.
- The install-packages action goes, with its 16 call sites: it only
  installed libunwind, which nothing links since node-segfault-handler was
  dropped (dumpme never linked it).
- with-retry.sh stays, for re2's install-time download.

Refs #2839

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@rolljee
rolljee merged commit 1e17606 into 2-dev Sep 26, 2026
47 checks passed
@rolljee
rolljee deleted the feat/prebuilt-native-addons branch September 26, 2026 21:18
@kuzzlebot

kuzzlebot Bot commented Sep 27, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.57.0-beta.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kuzzlebot

kuzzlebot Bot commented Sep 30, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.57.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kuzzlebot kuzzlebot Bot added the released This issue/pull request has been released. label Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released on @beta released This issue/pull request has been released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant