Skip to content

feat: use build manifest to load compatible binaries #717

Merged
aminya merged 7 commits intomasterfrom
build-manifest
Mar 31, 2025
Merged

feat: use build manifest to load compatible binaries #717
aminya merged 7 commits intomasterfrom
build-manifest

Conversation

@aminya
Copy link
Copy Markdown
Member

@aminya aminya commented Mar 31, 2025

This adds a manifest.json for the built binaries under built that allows the package to load the correct addon path during runtime. This PR also adds the libc/abi as information in the key, so it will avoid the conflicts between Musl/Glib, and loading will be faster since the compatible binaries are found deterministically.

Fixes #715

aminya added 2 commits March 31, 2025 02:28
This adds a `manifest.json` for the built binaries under built that allows the package to load the correct addon path during runtime. This PR also adds the libc/abi as information in the key, so it will avoid the conflicts between Musl/Glib, and loading will be faster since the compatible binaries are found deterministically.
@aminya aminya requested a review from Copilot March 31, 2025 17:10
Copy link
Copy Markdown

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 introduces a manifest-based approach for loading compatible addon binaries, replacing a directory scan with a manifest lookup. It also updates the CI workflow to download artifacts, merge manifests, and adjust build commands for native Windows builds.

  • Use a manifest.json to deterministically locate the correct addon based on platform, architecture, libc, and ABI.
  • Reflect the changes in both TypeScript (src/load-addon.ts) and JavaScript (lib/load-addon.js) implementations.
  • Update CI workflow (CI.yml) steps to merge build artifacts and manifests.

Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.

File Description
src/load-addon.ts Replaces directory scanning with manifest-based addon matching and adds build config.
lib/load-addon.js Mirrors TypeScript changes to use manifest for addon lookup.
.github/workflows/CI.yml Adjusts CI steps for artifact handling, manifest merging, and native Windows builds.
Files not reviewed (2)
  • package.json: Language not supported
  • pnpm-lock.yaml: Language not supported

Comment thread src/load-addon.ts Outdated
Comment thread lib/load-addon.js Outdated
Comment thread .github/workflows/CI.yml Outdated
@aminya aminya merged commit af92058 into master Mar 31, 2025
16 checks passed
@aminya aminya deleted the build-manifest branch March 31, 2025 23:16
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.

Addon fails to load on Ubuntu 22.04 due to musl-linked binary (libc.musl-x86_64.so.1 not found)

2 participants