arm64-musl: add rust and cargo to the build dependencies#234
Conversation
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
|
Is it confirmed that this works this easily? I tried it in 74ae38b but could not verify that the additional targets needed for arm actually work. |
docker-node does not currently consume 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. |
|
It's not as simple as dumping those two packages in because this is a cross-compiled target so the rust parts of the build need to be setup to cross-compile. |
Summary
Node 26 enables the Temporal API by default, but its build silently skips Temporal when
rustc/cargoare missing from PATH. Thex64-muslrecipe was already updated in #228; this PR is the corresponding fix forarm64-muslthat @MikeMcC399 explicitly called out as still outstanding in #227 (comment)... :So today the unofficial
linux-arm64-musltarball 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 gitSame
rust + cargoapk additions PR #228 made forrecipes/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