feat: support ARM64 musl targets#47
Merged
Merged
Conversation
spiral-ladder
approved these changes
Jul 10, 2026
matthewkeil
approved these changes
Jul 10, 2026
matthewkeil
pushed a commit
that referenced
this pull request
Jul 10, 2026
🤖 I have created a release *beep* *boop* --- ## [3.1.0](zapi-v3.0.0...zapi-v3.1.0) (2026-07-10) ### Features * support ARM64 musl targets ([#47](#47)) ([0bf4375](0bf4375)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
matthewkeil
added a commit
to ChainSafe/lodestar-z
that referenced
this pull request
Jul 10, 2026
## What changed - add `aarch64-unknown-linux-musl` to the Lodestar-Z native package target matrix - pin hashtree-z to the merged PIC-enabled commit from [ChainSafe/hashtree-z#12](ChainSafe/hashtree-z#12) - pin the Zig ZAPI dependency to the ARM64-musl backport on `zapi-v2.x.0` - keep the npm dependency on `@chainsafe/zapi` 2.0.0, apply the matching target-support backport with a pnpm patch, and bundle the patched dependency for consumers ## Why 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 - [ChainSafe/zapi#47](ChainSafe/zapi#47) is backported to `zapi-v2.x.0` - [ChainSafe/hashtree-z#12](ChainSafe/hashtree-z#12) is merged; `build.zig.zon` pins its canonical squash commit using `zig fetch --save=hashtree` ## Validation - complete `aarch64-unknown-linux-musl` ReleaseSafe build through the patched ZAPI 2 CLI - native host ReleaseSafe bindings build - frozen pnpm install - `pnpm lint` - `zig fmt --check build.zig.zon` - 236 binding tests passed - npm package dry run confirms the patched ZAPI 2 dependency is bundled > This PR was written with AI assistance. --------- Co-authored-by: matthewkeil <me@matthewkeil.com> Co-authored-by: bing <spiralladder@fastmail.com> Co-authored-by: Cayman <caymannava@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
aarch64-unknown-linux-muslto the supported target matrixaarch64-linux-musltargetcpu,os, andlibcmetadataWhy
Consumers such as
@chainsafe/lodestar-zcurrently publish ARM64 glibc and x64 musl binaries, but cannot build or load an ARM64 musl binary. This leaves Alpine Linux on ARM64 without a compatible native package.Impact
Packages using ZAPI can publish and load ARM64 musl binaries, restoring parity with native packages that already support Alpine on ARM64.
Validation
pnpm build:jspnpm lint:jszig buildzig build test:zapipnpm test:js— 93 tests passed