Repository navigation
Release v0.15.2
Unified embedding on LiteRT C API + Dart FFI on all native platforms (#264).
What changed
- Single Dart-side
LitertEmbeddingModelruns on Android, iOS, macOS, Linux, Windows viadart:ffiagainst the LiteRT C API. The LiteRT runtime is already shipped in the native bundle for inference accelerators — no new native dep. - Three legacy implementations deleted: Android
localagents-ragJVM lib, iOSTensorFlowLiteCpod + Swift tokenizer hierarchy, Desktoplibtensorflowlite_c.{dylib,so,dll}tarball. TaskType.prefixis now the single source of truth forretrievalQuery/retrievalDocumentprefix strings — fixes the cross-platform drift that caused #264 by construction.- Windows
LiteRtLayoutMSVC vs GCC/Clang bit-field ABI handled via dual-layout FFI structs (LiteRtLayoutPosix/LiteRtLayoutMsvc+ View helper).
Verification
Cross-platform RAG drift verified <0.003 on six platforms × two embedding models (Gecko 110M, EmbeddingGemma 300M):
| macOS | iOS Sim | iPhone | Pixel 8 | Linux T4 | Windows MSVC | |
|---|---|---|---|---|---|---|
| Gecko 64 climate↔warming | 0.9161 | 0.9161 | 0.9161 | 0.9168 | 0.9163 | 0.9163 |
| EmbeddingGemma 256 climate↔warming | 0.8695 | 0.8695 | 0.8695 | 0.8689 | 0.8668 | 0.8668 |
Full 18-test litertlm_ffi_test.dart integration suite green on macOS, Linux T4, Windows NPU VM (Intel Lunar Lake), Pixel 8.
Breaking changes
EmbeddingInstallationBuilder.tokenizerFromNetwork/Asset/Bundled/File: removed the iOS-onlyiosPath/iosTokenparameters. They were no-ops since 0.15.2 (same tokenizer on every platform now). Callers that omit them are unaffected; callers that pass them need to remove the named arg.
See CHANGELOG.md and the migration story in the PR description for the full diff.