Skip to content

feat: add more architectures support#183

Open
miwu04 wants to merge 1 commit intoAnInsomniacy:mainfrom
AOSC-Tracking:add-more-arch-support
Open

feat: add more architectures support#183
miwu04 wants to merge 1 commit intoAnInsomniacy:mainfrom
AOSC-Tracking:add-more-arch-support

Conversation

@miwu04
Copy link
Copy Markdown

@miwu04 miwu04 commented Apr 13, 2026

Description

适配更多的架构,增加了loongarch64,mips64el,powerpc64le,riscv64

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (must be discussed and approved in an issue first)
  • Refactor (no functional change)
  • Documentation / i18n
  • CI / build configuration

How has this been tested?

图片

AI usage disclosure

  • No AI tools were used
  • AI tools assisted with drafting, refactoring, or boilerplate (I reviewed and understand every line)
  • Substantial portions were AI-generated (I reviewed, tested, and can explain every change)
    AI对架构名的匹配并不太正确

If AI was used, specify the tool: MiniMax M2.7

Checklist

Required — PR will not be reviewed without these

  • I have read CONTRIBUTING.md
  • PR changes fewer than 300 lines of code (excluding tests and generated files)
  • PR touches fewer than 10 files
  • PR addresses one concern only — no mixed features, config tweaks, or unrelated fixes
  • All commands pass locally:
    pnpm format:check
    npx vue-tsc --noEmit
    pnpm test 
    cd src-tauri && cargo test
    

ci暂时未修改,pnpm test命令不可通过

If applicable

  • New feature was discussed and approved in an issue before implementation
  • Tests written before implementation (TDD: red → green → refactor)
  • i18n keys updated in all 26 locales via batch Python script (see AGENTS.md §D)
  • New config key follows the full checklist in AGENTS.md §C
  • Rust changes compile with cargo clippy (zero warnings)

Release notes

Notes:
信创用户需要对新架构的支持

@miwu04
Copy link
Copy Markdown
Author

miwu04 commented Apr 13, 2026

AnInsomniacy/aria2-builder#1
对应的静态aria2已创建pr

@miwu04
Copy link
Copy Markdown
Author

miwu04 commented Apr 13, 2026

若原生构建,该pr缺少对应平台的tauri-app/cli,而这么多架构只有riscv64有对应平台的tauri-app/cli
本次测试是在AOSC OS上完成,该系统的tauri-cli是系统内建,不借助npm仓库的tauri-app/cli
相关进度在 AOSC-Dev/aosc-os-abbs#15565 可查

@miwu04
Copy link
Copy Markdown
Author

miwu04 commented Apr 13, 2026

rollup缺少mips64el,不清楚上游对mips64el的态度,暂时保留
经测试,riscv64的实际产物错误,对应不上,已修改

@miwu04 miwu04 force-pushed the add-more-arch-support branch from c28b0d3 to 814dd66 Compare April 13, 2026 08:39
@miwu04
Copy link
Copy Markdown
Author

miwu04 commented Apr 13, 2026

Action 暂时不做修改,等待作者对pr的讨论

@miwu04
Copy link
Copy Markdown
Author

miwu04 commented Apr 14, 2026

不好意思,usePlatform的标签应该使用rust生态的架构名去对应,而不是nodejs生态,马上修复

@miwu04 miwu04 force-pushed the add-more-arch-support branch from 814dd66 to 7aff52b Compare April 14, 2026 05:54
@miwu04
Copy link
Copy Markdown
Author

miwu04 commented Apr 14, 2026

补充:mips和PowerPC都只做了小端序的适配

Copy link
Copy Markdown

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 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_machine assertions).
  • Added new architecture label mappings in usePlatform and 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.

Comment on lines +36 to +39
'loongarch64-unknown-linux-gnu',
'mips64el-unknown-linux-gnu',
'powerpc64le-unknown-linux-gnu',
'riscv64gc-unknown-linux-gnu',
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
'loongarch64-unknown-linux-gnu',
'mips64el-unknown-linux-gnu',
'powerpc64le-unknown-linux-gnu',
'riscv64gc-unknown-linux-gnu',

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

waiting aria2-builder

Comment thread src/composables/__tests__/usePlatform.test.ts
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