cera_ffi 0.5.4
cera_ffi: ^0.5.4 copied to clipboard
Dart bindings for the Cera on-device inference engine. Runs GGUF LLMs locally through dart:ffi, with no Flutter dependency.
Changelog #
0.5.4 #
Fixed #
- Model and Adapter Loading: Added fallback path loaders for LoRA adapters, Silero VAD, and Hybrid PII models when
cerais compiled without default features (mmapdisabled) on native targets.
Changed #
- Version Alignment: Bumped workspace patch version to 0.5.4 in lockstep with
cera_ffi_flutterand the underlying native engine crates.
0.5.3 #
Added #
- Streaming Text Chunks: Added
generateStreamChunksAPI for streaming multi-token text chunks, reducing cross-boundary messaging overhead. - Multimodal Envelopes: Added
MultimodalEnvelope,ImageInput, andAudioInputtypes for structured multimodal prompt delivery. - Android Download Service: Added support for background model asset downloading via
AndroidDownloadService. - Whisper ASR Integration: Added native bindings for OpenAI Whisper speech recognition models.
0.5.2 #
Changed #
- Version Alignment: Bumped workspace patch version to 0.5.2 in lockstep with
cera_ffi_flutterand the underlying native engine crates.
0.5.1 #
Added #
- WebGPU Dense Transformer Support: Direct GPU execution support for dense transformer architectures (
llama,qwen2,qwen3,granite) in addition tolfm2/lfm2.5/lfm2moe. - License Formatting: Cleaned dual Apache-2.0 / MIT license formatting for automated OSI recognition by
panaon pub.dev.
0.5.0 #
Added #
- Native Silero VAD v5 engine and bindings: Added
FfiSileroVad,FfiVadSampleRate,FfiVadIterator,FfiVadConfig, andsileroVadDefaultConfigfor real-time speech activity detection, streaming audio chunk processing, and speech segment timestamping. - Hugging Face model repository support: Direct loading from Hugging Face model repository specs and URLs with optional on-the-fly streaming quantization.
- Multimodal audio & vision enhancements: WebGPU Depthformer acceleration, 4 voice modes (SpeechToText, VoiceChat, TextToSpeech, TextOnly), microphone audio input, silence trimming, and vision encoder ViT optimizations.
0.4.0 #
First release. The Dart bindings previously lived inside the
cera_ffi_flutter package; they were split out here so that they can be used
without Flutter at all.
Added #
Cera, a portable asynchronous API that runs on every target including the web. One surface over two transports: the Rust async runtime natively, a Web Worker runningcera-wasmin a browser. Loading, chat templating, tokenizing and streaming generation, with generations serialized against one KV cache. The generated bindings stay synchronous and native-only;Ceraexists because a browser cannot offer a synchronousgenerateat any price.- Web inference, on WebGPU where the browser has it and on a wasm CPU build
where it does not (58 tok/s against 1.4 tok/s on the same machine and model).
dart run cera_ffi:install_webputs the runtime in an app'sweb/; no COOP/COEP headers are required. CeraEngine.fromPathAsyncandfromBytesAsync, so loading a model no longer blocks the calling isolate.dart:ffibindings for the Cera inference engine, generated from the compiledcera-fficdylib by a vendoreduniffi-bindgen-dartand committed underlib/src/generated/.CeraLibrary, a platform-aware loader: an explicit path, thenCERA_FFI_LIB, then the platform's normal search path.- Plain-Dart examples under
example/: chat, streaming, async, and download progress.
Notes #
- This package resolves under plain
dart pub get, which is the reason it exists. pub will not publish a package declaringflutter.plugin.platformswithout a Flutter SDK constraint, and declaring that constraint makesdart pub getrefuse the package outright. A Flutter plugin therefore cannot also be a plain-Dart package, so the bindings live here andcera_ffi_flutterdepends on them. - No native library ships with this package. Flutter apps get one from
cera_ffi_flutter; everyone else pointsCERA_FFI_LIBat acera-ffibuild. That build needs theffi-buffercargo feature, without which every call fails atdlsym. - The bindings are still exported conditionally, and the web branch is still a
generated stub with the same API and no
dart:ffi: data types are real, engine entry points throwUnsupportedError. That is what lets a multi-platform app build at all, since an unconditionaldart:ffiimport fails the whole build rather than one branch.