1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! rullama — Gemma 4 inference in the browser via wgpu + WASM.
//!
//! # Stability
//!
//! Three modules are the **stable public API** and follow semver across
//! 0.x patch releases:
//!
//! - [`api`] — the high-level [`api::Model`] handle, [`api::ChatMessage`],
//! [`api::ChatRole`], [`api::GenerateOptions`], and the
//! `loadFrom*` / `generate` / `stop` entry points. This is what
//! `#[wasm_bindgen]` exposes to JS, and what native Rust consumers
//! should program against.
//! - [`error`] — [`error::RullamaError`] and [`error::Result`].
//! - [`sampling`] — [`sampling::SamplingOptions`] and [`sampling::Sampler`].
//!
//! Every other module (`backend`, `gguf`, `kernels`, `model`, `multimodal`,
//! `reference`, `template`, `tokenizer`) is `#[doc(hidden)]` and is
//! considered **implementation detail**. They are reachable so that the
//! sibling workspace crates (`rullama-finetune`, `rullama-ios-bench`) can
//! link against the wgpu kernel set, the GGUF parser, and the parity
//! oracles — but their layout, names, and signatures may change in any
//! patch release without notice. External callers that pin against them
//! do so at their own risk.
pub use RullamaError;
// Re-export rsqlite-wasm's `WasmDatabase` so wasm-bindgen sees it as a
// reachable public symbol and emits its JS bindings into pkg/rullama.js.
// Without the re-export, the rlib's #[wasm_bindgen] exports get
// dead-code-stripped because nothing in rullama itself calls them — the
// PWA uses them only from JS.
pub use WasmDatabase;