Skip to content

Pin Rust for ARM64 musl npm builds - #120

Merged
shps951023 merged 1 commit into
mainfrom
fix/npm-arm64-musl-rust
Sep 3, 2026
Merged

shps951023 merged 1 commit into
mainfrom
fix/npm-arm64-musl-rust

Conversation

@shps951023

@shps951023 shps951023 commented Sep 3, 2026

Copy link
Copy Markdown
Member

Rust 1.98 adds --fix-cortex-a53-843419 to the aarch64-unknown-linux-musl target. napi-rs 2 invokes cargo build with a Zig linker, bypassing cargo-zigbuild 0.23's filter, so Zig rejects the new argument.

Pin only the affected target to Rust 1.97.1 while retaining stable Rust for the other seven release targets.

The failed publication stopped before any npm publish command ran.

Summary by CodeRabbit

  • Chores
    • Updated the build workflow to use Rust 1.97.1 for ARM64 Linux musl builds.
    • Other build targets continue using the stable Rust toolchain.

Rust 1.98 adds an AArch64 linker flag rejected by napi-rs 2's Zig linker path. Keep stable for all other targets and use Rust 1.97.1 only for aarch64-unknown-linux-musl.
Copilot AI lite review requested due to automatic review settings September 3, 2026 09:05
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 7358f68e-d8a3-40a2-ae65-2bb413bbe9ea

📥 Commits

Reviewing files that changed from the base of the PR and between af0617d and 1821c90.

📒 Files selected for processing (1)
  • .github/workflows/npm-publish.yml

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The npm publish workflow now uses Rust toolchain 1.97.1 for aarch64-unknown-linux-musl builds. Other targets continue using stable.

Changes

npm publish toolchain

Layer / File(s) Summary
Target-specific Rust toolchain
.github/workflows/npm-publish.yml
The workflow selects Rust 1.97.1 for aarch64-unknown-linux-musl and stable for other targets.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 1821c

The publish workflow pins Rust 1.97.1 only for the ARM64 musl build and leaves other release targets on stable Rust. No merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: pinning Rust for ARM64 musl npm builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/npm-arm64-musl-rust

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is narrowly scoped to CI configuration, uses a valid GitHub Actions expression for conditional toolchain selection, and aligns with the stated publication failure root cause.

Pull request overview

Pins the Rust toolchain used during the GitHub Actions npm publish build for the ARM64 musl target to avoid a Zig linker incompatibility introduced by Rust 1.98, while keeping all other release targets on stable Rust.

Changes:

  • Add a conditional Rust toolchain selection in the npm publish workflow.
  • Use Rust 1.97.1 only for aarch64-unknown-linux-musl; keep stable for all other matrix targets.
File summaries
File Description
.github/workflows/npm-publish.yml Conditionally pins Rust to 1.97.1 for the ARM64 musl matrix build to prevent Zig rejecting new rustc args.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@shps951023
shps951023 merged commit ef3503e into main Sep 3, 2026
4 checks passed
@shps951023
shps951023 deleted the fix/npm-arm64-musl-rust branch September 16, 2026 08:18
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.

2 participants