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
//! Low-level FFI bindings to `llama.cpp`.
//!
//! Generated at build time via [`bindgen`](https://docs.rs/bindgen) over `wrapper.h`, which in turn
//! includes the public C headers of `llama.cpp`, `ggml` and `gguf`.
//!
//! This crate is **unsafe by design**: every public item is a thin
//! `extern "C"` wrapper around a llama.cpp symbol. Use the safe
//! [`llama-crab`](https://docs.rs/llama-crab) crate instead unless
//! you need fine-grained control.
//!
//! ## Features
//!
//! | Feature | Description |
//! |---|---|
//! | `common` | Compile `libcommon.a` for chat templates and JSON schema helpers |
//! | `cuda` | NVIDIA CUDA backend |
//! | `cuda-no-vmm` | CUDA without Virtual Memory Management |
//! | `metal` | Apple Metal (default on macOS aarch64) |
//! | `vulkan` | Vulkan backend |
//! | `rocm` | AMD ROCm/HIP backend |
//! | `openmp` | OpenMP parallel CPU backend (default) |
//! | `dynamic-link` | Link against `libllama` as a shared object |
//! | `system-ggml` | Use GGML from the system instead of the bundled copy |
//! | `mtmd` | Multimodal (vision + audio) helpers |
//! | `llguidance` | `llguidance` sampler (custom C-ABI vtable) |
//! | `dynamic-backends` | Load GGML backends as shared objects at runtime |
include!;