Skip to content

arm64-musl: add rust and cargo to the build dependencies#234

Open
awbx wants to merge 1 commit into
nodejs:mainfrom
awbx:add-rust-arm64-musl
Open

arm64-musl: add rust and cargo to the build dependencies#234
awbx wants to merge 1 commit into
nodejs:mainfrom
awbx:add-rust-arm64-musl

Conversation

@awbx
Copy link
Copy Markdown

@awbx awbx commented May 25, 2026

Summary

Node 26 enables the Temporal API by default, but its build silently skips Temporal when rustc/cargo are missing from PATH. The x64-musl recipe was already updated in #228; this PR is the corresponding fix for arm64-musl that @MikeMcC399 explicitly called out as still outstanding in #227 (comment)... :

PR #228 resolved this issue for amd64. It did not address: recipes/arm64-musl for arm64

So today the unofficial linux-arm64-musl tarball ships without Temporal, which means any downstream consumer of these tarballs (currently x64-alpine via docker-node; arm64-alpine pending nodejs/docker-node#2475) is missing the feature on arm64-musl.

Diff

 RUN apk add --no-cache \
         libstdc++ \
     && apk add --no-cache --virtual .build-deps \
         ...
         ccache \
         xz \
         patch \
+        # rustc/cargo are needed for the Temporal API support in Node 26+
+        # (build silently skips Temporal when they are not in PATH)
+        rust \
+        cargo \
         # extra packages required for creating the musl based cross-compiler
         rsync make gcc g++ bzip2 git

Same rust + cargo apk additions PR #228 made for recipes/musl/Dockerfile.

Verification

alpine:3.22 (the recipe's base) ships both packages:

$ docker run --rm alpine:3.22 sh -c 'apk add --no-cache rust cargo && rustc --version && cargo --version'
rustc 1.87.0 (17067e9ac 2025-05-09) (Alpine Linux 1.87.0-r1)
cargo 1.87.0 (99624be96 2025-05-06) (Alpine Linux 1.87.0-r1)

As with #233, I haven't been able to validate the full Node build locally (musl-cross-make toolchain build is ~30 min and Node from source is ~1–2 hr on my hardware); the change mirrors #228 exactly so the risk should be similar.

Refs: #227, #228

Node 26 enables the Temporal API by default, but its build silently
skips Temporal when rustc/cargo are missing from PATH. The x64-musl
recipe was already updated in nodejs#228; this is the corresponding fix for
arm64-musl that was called out in nodejs#227 as still outstanding.

Refs: nodejs#227
@nikeee
Copy link
Copy Markdown
Contributor

nikeee commented May 25, 2026

Is it confirmed that this works this easily? I tried it in 74ae38b but could not verify that the additional targets needed fur arm work.

@MikeMcC399
Copy link
Copy Markdown
Contributor

So today the unofficial linux-arm64-musl tarball ships without Temporal, which means any downstream consumer of these tarballs (currently x64-alpine via docker-node; arm64-alpine pending nodejs/docker-node#2475) is missing the feature on arm64-musl.

docker-node does not currently consume linux-arm64-musl in the production branch. It uses only linux-amd64-musl.

Issue nodejs/docker-node#2486 was resolved in Node.js 26.1.0 for amd64 and in Node.js 26.2.0 for arm64.

If there are other consumers looking for this, then it would be helpful if they are in a position to test the outcome of this PR.

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.

3 participants