Skip to content

Publish Linux ARM64 native npm package #5

@affandar

Description

@affandar

Summary

Please publish a Linux ARM64 GNU native npm package for duroxide so Node.js applications can run in linux/arm64 containers.

The main duroxide package currently attempts to resolve a Linux ARM64 native binding as:

duroxide-linux-arm64-gnu

but that package is not published, so applications crash at import time on Linux ARM64.

Why this matters

PilotSwarm publishes a starter Docker appliance built from a Debian-based image (node:24-bookworm-slim). We tried publishing the image as multi-arch (linux/amd64,linux/arm64) so Apple Silicon users could run:

docker pull affandar/pilotswarm-starter:latest
docker run ... affandar/pilotswarm-starter:latest

Docker correctly selected the linux/arm64 image on Apple Silicon, but the portal and workers crashed immediately because importing duroxide failed to load the missing Linux ARM64 native package. The browser then saw an empty response from the starter appliance because the runtime processes were dead.

Observed behavior

On linux/arm64, Node fails while resolving the native package:

Cannot find module duroxide-linux-arm64-gnu

The practical result is that a multi-arch Docker image cannot safely advertise linux/arm64 even though the rest of the Node.js app and base OS image are compatible.

Expected behavior

The published duroxide package should support Linux ARM64 by including a native optional dependency/package for:

package: duroxide-linux-arm64-gnu
target: aarch64-unknown-linux-gnu
platform: linux
arch: arm64
libc: glibc

Then the main package loader/generated native binding metadata should resolve process.platform === "linux" and process.arch === "arm64" to that package.

Requested change

  1. Add and publish duroxide-linux-arm64-gnu.
  2. Add it as an optional dependency of the main duroxide npm package.
  3. Ensure the native binding loader recognizes Linux ARM64 GNU.
  4. Publish a new duroxide release containing the main package and the new native package.

A duroxide-linux-arm64-musl package would also be useful later, but linux-arm64-gnu is the blocker for Debian/Ubuntu-based Node containers.

Current workaround

PilotSwarm had to revert its starter Docker image back to linux/amd64 only and document this Apple Silicon workaround:

docker pull --platform linux/amd64 affandar/pilotswarm-starter:latest
docker run --platform linux/amd64 ... affandar/pilotswarm-starter:latest

That works under Docker Desktop emulation, but it is slower and prevents a seamless default Docker experience on Apple Silicon.

Validation once fixed

After a duroxide release with duroxide-linux-arm64-gnu, downstream images should be able to publish:

platforms: linux/amd64,linux/arm64

and docker pull <image>:latest should work on Apple Silicon without a --platform override.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions