feat(m0): add flutter app, android rust pipeline and 16kb alignment check

This commit is contained in:
2026-10-24 19:57:04 +02:00
parent 51c335db84
commit 7fc31151cc
28 changed files with 847 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Builds the Rust CDylib for Android and places it into app jniLibs.
set -euo pipefail
cd "$(dirname "$0")/.."
export ANDROID_NDK_HOME="${ANDROID_NDK_HOME:-$HOME/Android/Sdk/ndk/28.2.13676358}"
cargo ndk --platform 24 \
-t arm64-v8a -t armeabi-v7a -t x86_64 \
-o app/android/app/src/main/jniLibs \
build --release -p ffi
for abi in arm64-v8a armeabi-v7a x86_64; do
so="app/android/app/src/main/jniLibs/$abi/libffi.so"
if readelf -lW "$so" | awk '$1=="LOAD" && $NF!="0x4000" {found=1} END{exit !found}'; then
echo "ERROR: $abi not 16 KB aligned" >&2
exit 1
fi
done
echo 'OK: all ABIs 16 KB aligned'