feat: publish ARM64 musl bindings - #482
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4fcb93f5d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "targets": [ | ||
| "aarch64-apple-darwin", | ||
| "aarch64-unknown-linux-gnu", | ||
| "aarch64-unknown-linux-musl", |
There was a problem hiding this comment.
Update ZAPI before adding the ARM64 musl target
Adding this entry makes the publish workflow parse zapi.targets with the declared @chainsafe/zapi dependency (pnpm zapi build-artifacts in .github/workflows/publish-bindings.yml), but package.json/pnpm-lock.yaml still pin @chainsafe/zapi to 2.0.0. That version's config parser only accepts its built-in target list, which does not include aarch64-unknown-linux-musl, so the release job will fail with Unsupported target before it can publish any bindings; runtime loading also keeps using the old requireNapiLibrary mapping. Please bump @chainsafe/zapi and the lockfile to the release containing ChainSafe/zapi#47 in the same change.
Useful? React with 👍 / 👎.
nflaig
left a comment
There was a problem hiding this comment.
LGTM, thanks Cayman for fixing up the branch properly
What changed
aarch64-unknown-linux-muslto the Lodestar-Z native package target matrixzapi-v2.x.0@chainsafe/zapi2.0.0, apply the matching target-support backport with a pnpm patch, and bundle the patched dependency for consumersWhy
Lodestar currently receives an ARM64 musl binary from
@chainsafe/blst. Replacing it with Lodestar-Z without an equivalent artifact would regress Alpine Linux support on ARM64.The first real cross-build also exposed non-PIC objects in hashtree-z, which prevented the native Node.js shared library from linking. The pinned prerequisite commit fixes that linker failure.
Dependency chain
zapi-v2.x.0build.zig.zonpins its canonical squash commit usingzig fetch --save=hashtreeValidation
aarch64-unknown-linux-muslReleaseSafe build through the patched ZAPI 2 CLIpnpm lintzig fmt --check build.zig.zon