Skip to content

feat: 0.9.0 Android NDK native C++ compilation and Gradle integration - #3

Closed
sebasbad wants to merge 3 commits into
feat/0.9.0-ios-macos-flutter-supportfrom
feat/0.9.0-android-support
Closed

feat: 0.9.0 Android NDK native C++ compilation and Gradle integration#3
sebasbad wants to merge 3 commits into
feat/0.9.0-ios-macos-flutter-supportfrom
feat/0.9.0-android-support

Conversation

@sebasbad

Copy link
Copy Markdown
Owner

🤖 0.9.0 Android NDK Native C++ Compilation & Gradle Integration

📌 Executive Summary

This PR builds on top of the 0.9.0 isolate architecture (#2) to provide Android NDK C++ native shared object libraries (libllama.so for arm64-v8a), automatic Flutter Android plugin linking, and NDK cross-compilation toolchain integration.


🔑 Key Changes & Implementation Details

  1. Android NDK C++ Shared Objects (arm64-v8a):

    • Compiled libllama.so, libggml-base.so, libggml-cpu.so, libmtmd.so (Vision/VLM), and libggml.so using Android NDK toolchain (API level 26 / Oreo floor).
    • Debug info stripped via llvm-strip to keep binary sizes lightweight (libllama.so ~3.1MB).
  2. Flutter Android Plugin Integration (android/):

    • Added android/build.gradle and android/src/main/AndroidManifest.xml.
    • Added android/src/main/jniLibs/arm64-v8a/ containing stripped native .so binaries for automatic Flutter Gradle embedding.
  3. Platform Manifest Update (pubspec.yaml):

    • Re-added android: ffiPlugin: true under flutter.plugin.platforms.

✅ Verification

  • dart analyze: 0 Errors, 0 Warnings, 0 Hints (No issues found!).
  • Binary Stripping: Verified stripped .so binaries in android/src/main/jniLibs/arm64-v8a/.

@sebasbad
sebasbad force-pushed the feat/0.9.0-android-support branch from b3f8e33 to d6f010e Compare August 1, 2026 07:56
@sebasbad
sebasbad changed the base branch from feat/0.9.0-architecture to feat/0.9.0-ios-macos-flutter-support August 1, 2026 07:56
@sebasbad

sebasbad commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Closing in favor of main and upstream draft PR netdur#111.

Context:
The repository main branch has been synced with upstream/main (v0.9.0-dev.12), which natively handles Android NDK asset building. Upstream draft PR netdur#111 (feat/cocoapods-swiftpm-dual-support) consolidates mobile platform compatibility.

@sebasbad sebasbad closed this Aug 2, 2026
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.

1 participant