Skip to main content

product_os_models_ffi/
lib.rs

1//! product-os-models-ffi: FFI facade for running ONNX, safetensors, and GGUF models on iOS/Android.
2//!
3//! Exposes TtsSession, LlmSession, and InferenceSession via uniffi for use from Swift (iOS) and Kotlin (Android).
4//! See MOBILE.md for build and integration.
5
6#![warn(missing_docs)]
7#![warn(clippy::unwrap_used)]
8
9#[cfg(feature = "ffi")]
10uniffi::setup_scaffolding!();
11
12pub mod error;
13pub mod config;
14
15#[cfg(any(feature = "llm", feature = "onnx_llm"))]
16pub mod callbacks;
17
18#[cfg(feature = "inference_onnx")]
19pub mod ort_init;
20#[cfg(any(
21    feature = "inference_onnx",
22    feature = "inference_classical",
23    feature = "inference_burn"
24))]
25pub mod inference;
26
27#[cfg(feature = "tts")]
28pub mod tts;
29
30#[cfg(feature = "llm")]
31pub mod llm;
32
33#[cfg(feature = "onnx_llm")]
34pub mod onnx_llm;