From c0bc5acab05adbbca78ce6ae41eb649af7bb2d62 Mon Sep 17 00:00:00 2001 From: Camille Scholtz Date: Sun, 2 Nov 2025 20:21:53 +0100 Subject: [PATCH] Add support for FreeBSD aarch64 (arm64) This adds FreeBSD arm64 build targets to both the npm package builder and the release workflow, enabling native binaries for FreeBSD on aarch64 architecture. Fixes #991 --- .github/workflows/release.yml | 12 +++++++++++- scripts/build-npm.js | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95d30431..40a5d34f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -175,6 +175,15 @@ jobs: lightningcss build-freebsd: + strategy: + fail-fast: false + matrix: + include: + - arch: x86_64 + target: x86_64-unknown-freebsd + - arch: arm64 + target: aarch64-unknown-freebsd + name: build-${{ matrix.target }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -188,6 +197,7 @@ jobs: with: operating_system: freebsd version: '14.0' + architecture: ${{ matrix.arch }} memory: 13G cpu_count: 3 environment_variables: 'DEBUG RUSTUP_IO_THREADS' @@ -217,7 +227,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: bindings-x86_64-unknown-freebsd + name: bindings-${{ matrix.target }} path: | *.node lightningcss diff --git a/scripts/build-npm.js b/scripts/build-npm.js index ef447a7e..91e5de65 100644 --- a/scripts/build-npm.js +++ b/scripts/build-npm.js @@ -39,6 +39,9 @@ const triples = [ { name: 'x86_64-unknown-freebsd' }, + { + name: 'aarch64-unknown-freebsd' + }, { name: 'aarch64-linux-android' }