dist(release): prebuilt universal Apple XCFramework and Android AAR for downstream git consumption - #9
Open
sebasbad wants to merge 6 commits into
Open
dist(release): prebuilt universal Apple XCFramework and Android AAR for downstream git consumption#9sebasbad wants to merge 6 commits into
sebasbad wants to merge 6 commits into
Conversation
…anager support Restores CocoaPods compatibility (llama_cpp_dart.podspec) alongside the newly added SwiftPM manifest (Package.swift) for Flutter iOS apps with CocoaPods-only dependencies (e.g. google_mobile_ads). Key Changes: - Added llama_cpp_dart.podspec, ios/llama_cpp_dart.podspec, and darwin/llama_cpp_dart.podspec vendoring llama-xcframework.zip. - Updated pubspec.yaml with podspecPath: llama_cpp_dart.podspec under iOS/macOS platform declarations. - Bundled native/android/llama-cpp-dart.aar in repository for git dependency compatibility. - Fixed iOS dynamic framework symbol lookup (LlamaLibrary.loadFromProcess) to support case-sensitive physical device APFS paths (Llama.framework/Llama).
…ces for llama.xcframework
… top of PR branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This distribution branch is intended for downstream Flutter projects (e.g.
flutter-image-to-text-app) that consumellama_cpp_dartdirectly via a Git dependency inpubspec.yaml.It contains the identical clean source code, Podspecs, and SwiftPM manifest from the upstream PR branch (
feat/cocoapods-swiftpm-dual-support), plus precompiled, universal multi-architecture binaries.Why This Distribution Branch Exists
1. Direct Git Dependency Resolution
When Flutter apps declare a git dependency in
pubspec.yaml(git: url: ... ref: dist/cocoapods-swiftpm-dual-support), Flutter performs a shallow git clone into~/.pub-cache/git/.Because CocoaPods does not compile native C++ sources during
pod install, the prebuilt.xcframeworkmust physically reside inside the cloned directory.2. Universal Hardware & Simulator Support
The bundled
build/apple/llama.xcframeworkis a universal fat framework containing:ios-arm64: Physical iPhone and iPad devices.ios-arm64_x86_64-simulator: Universal iOS Simulator (runs natively on Apple Silicon M1-M4 Macs as well as Intelx86_64Macs / Rosetta).macos-arm64_x86_64: Universal macOS Desktop application support.3. Android Ready-to-use AAR
Includes
native/android/llama-cpp-dart.aarcompiled for ARM64, ARMv7, x86, and x86_64 so Android builds link immediately out of the box.Relationship to Upstream
400e72b) with precompiled binary assets added for immediate downstream usage.