Skip to content

feat: add Linux ARM64 (aarch64) build target#156

Merged
SparkZou merged 4 commits intomainfrom
feat/07-01-BuilDocker
Jan 7, 2026
Merged

feat: add Linux ARM64 (aarch64) build target#156
SparkZou merged 4 commits intomainfrom
feat/07-01-BuilDocker

Conversation

@SparkZou
Copy link
Collaborator

@SparkZou SparkZou commented Jan 7, 2026

  • Add linux-aarch64 to build matrix in release workflow
  • Configure cross-compilation toolchain for ARM64
  • Install gcc-aarch64-linux-gnu for cross-compilation
  • Set proper linker for aarch64 target

This enables native ARM64 wheel builds for better performance on ARM-based Docker environments (AWS Graviton, Apple Silicon, etc.)

- Add linux-aarch64 to build matrix in release workflow
- Configure cross-compilation toolchain for ARM64
- Install gcc-aarch64-linux-gnu for cross-compilation
- Set proper linker for aarch64 target

This enables native ARM64 wheel builds for better performance
on ARM-based Docker environments (AWS Graviton, Apple Silicon, etc.)
Copilot AI review requested due to automatic review settings January 7, 2026 08:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for building native Linux ARM64 (aarch64) wheels to improve performance on ARM-based infrastructure like AWS Graviton and Apple Silicon Docker environments. The changes configure cross-compilation toolchains and update the release workflow to produce ARM64 binaries alongside existing x86_64 builds.

Key changes:

  • Added linux-aarch64 build matrix entry with aarch64-unknown-linux-gnu target
  • Configured Rust toolchain to support cross-compilation targets
  • Added cross-compilation setup step that installs gcc-aarch64-linux-gnu toolchain

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +81 to +82
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linker environment variable is set globally for all build jobs, but it's only relevant for the linux-aarch64 target. This will set the environment variable unnecessarily for all other platforms (including linux-x86_64, macOS, and Windows), which could potentially cause issues. The environment variable should be conditionally set only when building for linux-aarch64, similar to how the cross-compilation tools are installed.

Copilot uses AI. Check for mistakes.
@@ -59,9 +67,19 @@ jobs:

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the target is an empty string, this will pass an empty string to the Rust toolchain setup, which may cause issues. The dtolnay/rust-toolchain action should not receive an empty targets parameter when no cross-compilation is needed. Consider adding a conditional to only include the 'with' block when the target is non-empty.

Suggested change
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@stable
- name: Setup Rust target
if: matrix.target != ''
uses: dtolnay/rust-toolchain@stable
Copilot uses AI. Check for mistakes.
@SparkZou SparkZou merged commit 0c90fcf into main Jan 7, 2026
3 checks passed
@SparkZou SparkZou deleted the feat/07-01-BuilDocker branch January 7, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants