feat: add more architectures support#183
Conversation
|
AnInsomniacy/aria2-builder#1 |
|
若原生构建,该pr缺少对应平台的tauri-app/cli,而这么多架构只有riscv64有对应平台的tauri-app/cli |
|
rollup缺少mips64el,不清楚上游对mips64el的态度,暂时保留 |
c28b0d3 to
814dd66
Compare
|
Action 暂时不做修改,等待作者对pr的讨论 |
|
不好意思,usePlatform的标签应该使用rust生态的架构名去对应,而不是nodejs生态,马上修复 |
814dd66 to
7aff52b
Compare
|
补充:mips和PowerPC都只做了小端序的适配 |
There was a problem hiding this comment.
Pull request overview
This PR extends the app’s multi-architecture support by adding additional Linux target triples to the sidecar-binary validation suite and exposing human-readable labels for new CPU architectures in the platform composable.
Changes:
- Added loongarch64, mips64el, powerpc64le, and riscv64gc Linux target triples to sidecar binary structural tests (including ELF
e_machineassertions). - Added new architecture label mappings in
usePlatformand corresponding unit tests for label outputs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/shared/__tests__/sidecarBinaries.test.ts |
Expands expected target triples and ELF machine-type assertions for additional Linux architectures. |
src/composables/usePlatform.ts |
Adds human-readable labels for additional architectures. |
src/composables/__tests__/usePlatform.test.ts |
Adds label tests for new architectures (but drops unknown-arch fallback coverage). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'loongarch64-unknown-linux-gnu', | ||
| 'mips64el-unknown-linux-gnu', | ||
| 'powerpc64le-unknown-linux-gnu', | ||
| 'riscv64gc-unknown-linux-gnu', |
There was a problem hiding this comment.
Adding these new Linux target triples makes the test suite fail with the current repo state: (1) the corresponding sidecar binaries are not present under src-tauri/binaries, so the “exists” assertions will fail; and (2) the CI matrix sync guard asserts release.yml contains every EXPECTED_TARGET, but .github/workflows/release.yml currently only includes x86_64/aarch64 Linux targets. Either add the new binaries + update the release.yml matrix in this PR, or keep EXPECTED_TARGETS limited to what the repo/CI actually builds today.
| 'loongarch64-unknown-linux-gnu', | |
| 'mips64el-unknown-linux-gnu', | |
| 'powerpc64le-unknown-linux-gnu', | |
| 'riscv64gc-unknown-linux-gnu', |
Description
适配更多的架构,增加了loongarch64,mips64el,powerpc64le,riscv64
Type of change
How has this been tested?
AI usage disclosure
AI对架构名的匹配并不太正确
If AI was used, specify the tool: MiniMax M2.7
Checklist
Required — PR will not be reviewed without these
ci暂时未修改,pnpm test命令不可通过
If applicable
cargo clippy(zero warnings)Release notes
Notes:
信创用户需要对新架构的支持