-
Notifications
You must be signed in to change notification settings - Fork 4.9k
feat: @tarojs/binding 添加 linux-arm64-gnu 构建目标 #18748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
核心概述该拉取请求为 Taro 原生绑定添加了对 Linux ARM64 GNU 架构(aarch64-unknown-linux-gnu)的编译和分发支持。包括 GitHub Actions 工作流配置、package.json 依赖声明以及新的 npm 包目录结构。 变更清单
预估代码审查工作量🎯 2 (简单) | ⏱️ ~12 分钟 相关拉取请求
建议审查者
庆祝诗
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
.github/workflows/build-rust-binding.ymlcrates/native_binding/package.jsonnpm/linux-arm64-gnu/README.mdnpm/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-darwin、x86_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-aarch64Docker 镜像进行交叉编译- 使用
aarch64-unknown-linux-gnu-strip而非普通strip,这对于交叉编译是正确的- 构建脚本格式、corepack 版本与
x86_64-unknown-linux-gnu配置保持一致
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
这个 PR 做了什么? (简要描述所做更改)
@tarojs/binding 添加 linux-arm64-gnu 构建目标
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台:
Summary by CodeRabbit
发布说明
✏️ Tip: You can customize this high-level summary in your review settings.