litertlm 0.0.1 copy "litertlm: ^0.0.1" to clipboard
litertlm: ^0.0.1 copied to clipboard

Unified Flutter package for LiteRT-LM on every platform.

flutter_litertlm #

Unified Flutter package for LiteRT-LM on every platform.

Project Strategy #

This project is intended to be a lightweight bridge to prebuilt LiteRT-LM packages. It uses the official LiteRT-LM package on each platform if it exists to maximize platform-level optimizations. This package therefore provides official, platform-optimized binaries while exposing a unified Dart interface across all supported platforms.

Platform Support #

Platform Runtime artifact Integration Limitations
iOS Official Swift package C FFI N/A
Android Official Gradle package JNI FFI N/A
macOS Official Swift package C FFI N/A
Windows Prebuilt C library C FFI x86_64 only
Linux Prebuilt C library C FFI x86_64 only
Web Official npm package JS interop N/A

Code Layout #

  • lib/litertlm.dart: Public API entry
  • lib/contracts/*.dart: Public contracts
  • lib/native/runtime.dart: Unified runtime interface and platform selector
  • lib/native/ffi/c.dart: C FFI runtime
  • lib/native/ffi/jni.dart: JNI FFI runtime
  • lib/native/js_interop/runtime.dart: JS interop runtime
  • src/native_ffi_support.c: Native C FFI support for allocation and callback bridging

Runtime Reliability #

This package works as a lightweight bridge to the official LiteRT-LM prebuilt runtime libraries. Native runtime failures may crash or emit process-level signals that Dart cannot catch. This package aims to expose the runtime interface as close to the original as possible, it will not try to fix/repair/fallback for known unsupported cases.

0
likes
120
points
2
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Unified Flutter package for LiteRT-LM on every platform.

Repository (GitHub)

License

MIT (license)

Dependencies

code_assets, flutter, flutter_web_plugins, hooks, jni, logging, native_toolchain_c

More

Packages that depend on litertlm

Packages that implement litertlm