Support linux aarch64 for Dart and Flutter (#2342)

Adds support for building and packaging Linux AArch64 (arm64) artifacts alongside x64 for Dart/Flutter plugins.

- Detects host architecture in CMake and adjusts library paths
- Extends test workflows to run on an ARM runner and handle linux-aarch64 paths
- Splits release pipeline into separate x64 and aarch64 build/package jobs
This commit is contained in:
Fangjun Kuang
2025-07-04 19:33:48 +08:00
committed by GitHub
parent 3bf986d08d
commit 53a3ad366b
7 changed files with 206 additions and 53 deletions

View File

@@ -25,6 +25,14 @@ Future<void> initSherpaOnnx() async {
exit(1);
}
final libPath = p.join(p.dirname(p.fromUri(uri)), '..', platform);
var libPath = p.join(p.dirname(p.fromUri(uri)), '..', platform);
if (platform == 'linux') {
final arch = Platform.version.contains('arm64') ||
Platform.version.contains('aarch64')
? 'aarch64'
: 'x64';
libPath = p.join(p.dirname(p.fromUri(uri)), '..', platform, arch);
}
sherpa_onnx.initBindings(libPath);
}