Skip to content

Conversation

@Single-Dancer
Copy link
Collaborator

@Single-Dancer Single-Dancer commented Jan 13, 2026

这个 PR 做了什么? (简要描述所做更改)
@tarojs/binding 添加 linux-arm64-gnu 构建目标

这个 PR 是什么类型? (至少选择一个)

  • 错误修复 (Bugfix) issue: fix #
  • 新功能 (Feature)
  • 代码重构 (Refactor)
  • TypeScript 类型定义修改 (Types)
  • 文档修改 (Docs)
  • 代码风格更新 (Code style update)
  • 构建优化 (Chore)
  • 其他,请描述 (Other, please describe):

这个 PR 涉及以下平台:

  • 所有平台
  • Web 端(H5)
  • 移动端(React-Native)
  • 鸿蒙(Harmony)
  • 鸿蒙容器(Harmony Hybrid)
  • ASCF 元服务
  • 快应用(QuickApp)
  • 所有小程序
  • 微信小程序
  • 企业微信小程序
  • 京东小程序
  • 百度小程序
  • 支付宝小程序
  • 支付宝 IOT 小程序
  • 钉钉小程序
  • QQ 小程序
  • 飞书小程序
  • 快手小程序
  • 头条小程序

Summary by CodeRabbit

发布说明

  • 新功能
    • 新增对 ARM64 架构(aarch64)Linux GNU 环境的支持,扩展了原生绑定的平台兼容性
    • 发布了针对 Linux ARM64 GNU 构建的专用 npm 包

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

核心概述

该拉取请求为 Taro 原生绑定添加了对 Linux ARM64 GNU 架构(aarch64-unknown-linux-gnu)的编译和分发支持。包括 GitHub Actions 工作流配置、package.json 依赖声明以及新的 npm 包目录结构。

变更清单

队列 / 文件 变更摘要
GitHub Actions 工作流
.github/workflows/build-rust-binding.yml
添加 ubuntu-22.04 上的 aarch64-unknown-linux-gnu 矩阵条目,包括使用 debian-aarch64 Docker 镜像、安装 corepack、运行 pnpm 以及对原生绑定进行架构特定的剥离操作
主包配置
crates/native_binding/package.json
在 napi.triples.additional 中添加 aarch64-unknown-linux-gnu 目标三元组,在 optionalDependencies 中新增 @tarojs/binding-linux-arm64-gnu 依赖
ARM64 GNU 包目录
npm/linux-arm64-gnu/README.md, npm/linux-arm64-gnu/package.json
创建新的平台特定 npm 包定义,包含包元数据(@tarojs/binding-linux-arm64-gnu,版本 4.1.10-beta.13)、Linux ARM64 架构限制、MIT 许可证和主入口文件配置

预估代码审查工作量

🎯 2 (简单) | ⏱️ ~12 分钟

相关拉取请求

建议审查者

  • yechunxi
  • luckyadam
  • tutuxxx

庆祝诗

🐰 ARM 的臂膀伸向远方,
新架构在工作流中绽放光芒,
aarch64 的编译欢快跳跃,
跨越云端,二进制在飞翔!
包与包相连,生态更坚强。 ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题清晰准确地反映了本次变更的主要内容,即为 @tarojs/binding 添加 linux-arm64-gnu 构建目标。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/binding

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Single-Dancer Single-Dancer requested a review from tutuxxx January 13, 2026 09:44
@coderabbitai coderabbitai bot requested review from luckyadam and yechunxi January 13, 2026 09:44
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
npm/linux-arm64-gnu/package.json (1)

1-26: 版本号与主包不一致,请确认是否符合预期。

主包 @tarojs/binding 的版本是 4.1.10-alpha.0,而此包的版本是 4.1.10-beta.13。虽然这可能是预发布测试的有意设置,但建议确认版本是否应该保持同步。

其他配置均正确:

  • 平台约束 (os: linux, cpu: arm64, libc: glibc) 与 aarch64-unknown-linux-gnu 目标匹配
  • Node 引擎要求 >= 18 与 CI 工作流一致
🔧 如果需要同步版本号
-  "version": "4.1.10-beta.13",
+  "version": "4.1.10-alpha.0",
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d166826 and 7cf9f7e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • .github/workflows/build-rust-binding.yml
  • crates/native_binding/package.json
  • npm/linux-arm64-gnu/README.md
  • npm/linux-arm64-gnu/package.json
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-08-25T22:16:50.118Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18150
File: packages/babel-plugin-transform-taroapi/tests/__mocks__/h5-definition.json:2356-2356
Timestamp: 2025-08-25T22:16:50.118Z
Learning: The file `packages/babel-plugin-transform-taroapi/tests/__mocks__/h5-definition.json` is auto-generated by the post-build script `packages/taro-platform-h5/scripts/post-build.mjs`, which copies content from `taro-platform-h5/dist/definition.json`. This file should not be manually edited.

Applied to files:

  • npm/linux-arm64-gnu/package.json
📚 Learning: 2025-09-05T18:40:45.775Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18150
File: packages/taro-platform-harmony-hybrid/package.json:43-45
Timestamp: 2025-09-05T18:40:45.775Z
Learning: 在 tarojs/plugin-platform-harmony-hybrid 包中,tarojs/components-library-react、tarojs/components-library-solid 和 tarojs/components-library-vue3 必须作为直接依赖(dependencies)而不能作为 peer 依赖,因为插件源码中有对这些包的直接引用,包括 componentAdapter* getter 方法和 webpack 别名配置。

Applied to files:

  • crates/native_binding/package.json
📚 Learning: 2025-08-08T02:32:58.265Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18146
File: packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/package.json:12-14
Timestamp: 2025-08-08T02:32:58.265Z
Learning: 在 Taro 项目的 pnpm 工作区中,Vitest 相关依赖(vitest 和 vitest/coverage-istanbul)被管理在根目录的 package.json 中,而不是各个子包的 devDependencies 中。这是 monorepo 中依赖提升的标准做法。

Applied to files:

  • crates/native_binding/package.json
📚 Learning: 2025-05-25T18:02:31.387Z
Learnt from: ianzone
Repo: NervJS/taro PR: 17746
File: packages/taro-runtime/tsdown.config.ts:10-16
Timestamp: 2025-05-25T18:02:31.387Z
Learning: 在 taro-runtime 包的 tsdown 配置中,必须禁用 treeshake 来保留 dom-external/index.js 文件。

Applied to files:

  • crates/native_binding/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Build Rust Binding / stable - aarch64-unknown-linux-gnu
  • GitHub Check: Build Rust Binding / stable - x86_64-pc-windows-msvc
  • GitHub Check: Build Rust Binding / stable - x86_64-unknown-linux-gnu
  • GitHub Check: Build Rust Binding / stable - aarch64-apple-darwin
  • GitHub Check: Build Rust Binding / stable - aarch64-unknown-linux-gnu
  • GitHub Check: Build Rust Binding / stable - x86_64-pc-windows-msvc
🔇 Additional comments (4)
crates/native_binding/package.json (2)

11-15: LGTM!新增的 NAPI 构建目标配置正确。

aarch64-unknown-linux-gnu 目标三元组与现有目标(aarch64-apple-darwinx86_64-unknown-linux-musl)的命名风格一致,且正确对应 Linux ARM64 GNU 平台。


56-62: LGTM!可选依赖配置正确且保持了字母序排列。

新增的 @tarojs/binding-linux-arm64-gnu 可选依赖:

  • 使用 workspace:* 版本声明,与其他平台绑定包保持一致
  • 按字母顺序正确插入在 linux-x64-gnu 之前
npm/linux-arm64-gnu/README.md (1)

1-3: LGTM!README 内容简洁且与其他平台包保持一致。

包名和目标三元组描述准确无误。

.github/workflows/build-rust-binding.yml (1)

39-46: CI 构建配置正确且与现有 Linux 构建保持一致。

aarch64 配置要点:

  • 使用 ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 Docker 镜像进行交叉编译
  • 使用 aarch64-unknown-linux-gnu-strip 而非普通 strip,这对于交叉编译是正确的
  • 构建脚本格式、corepack 版本与 x86_64-unknown-linux-gnu 配置保持一致

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.32%. Comparing base (d166826) to head (7cf9f7e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #18748   +/-   ##
=======================================
  Coverage   56.32%   56.32%           
=======================================
  Files         447      447           
  Lines       23345    23345           
  Branches     5763     5747   -16     
=======================================
  Hits        13149    13149           
- Misses       8367     8369    +2     
+ Partials     1829     1827    -2     
Flag Coverage Δ
taro-cli 72.85% <ø> (ø)
taro-runtime 60.27% <ø> (ø)
taro-web 53.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Single-Dancer Single-Dancer merged commit 032fbed into main Jan 14, 2026
41 checks passed
@Single-Dancer Single-Dancer deleted the feat/binding branch January 14, 2026 03:04
@Single-Dancer Single-Dancer added this to the 4.1.10 milestone Jan 14, 2026
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.

3 participants