llama_crab_sys/lib.rs
1//! Low-level FFI bindings to `llama.cpp`.
2//!
3//! Generated at build time via [`bindgen`](https://docs.rs/bindgen) over `wrapper.h`, which in turn
4//! includes the public C headers of `llama.cpp`, `ggml` and `gguf`.
5//!
6//! This crate is **unsafe by design**: every public item is a thin
7//! `extern "C"` wrapper around a llama.cpp symbol. Use the safe
8//! [`llama-crab`](https://docs.rs/llama-crab) crate instead unless
9//! you need fine-grained control.
10//!
11//! ## Features
12//!
13//! | Feature | Description |
14//! |---|---|
15//! | `common` | Compile `libcommon.a` for chat templates and JSON schema helpers |
16//! | `cuda` | NVIDIA CUDA backend |
17//! | `cuda-no-vmm` | CUDA without Virtual Memory Management |
18//! | `metal` | Apple Metal (default on macOS aarch64) |
19//! | `vulkan` | Vulkan backend |
20//! | `rocm` | AMD ROCm/HIP backend |
21//! | `openmp` | OpenMP parallel CPU backend (default) |
22//! | `dynamic-link` | Link against `libllama` as a shared object |
23//! | `system-ggml` | Use GGML from the system instead of the bundled copy |
24//! | `mtmd` | Multimodal (vision + audio) helpers |
25//! | `llguidance` | `llguidance` sampler (custom C-ABI vtable) |
26//! | `dynamic-backends` | Load GGML backends as shared objects at runtime |
27
28#![doc(
29 html_logo_url = "https://gist.githubusercontent.com/DominguesM/127b9e5614e0e2da6b896fb3da3c8f2d/raw/a42e6daa629eb6f0254de026c47da9aff3c1f0e2/canarim-crab.webp"
30)]
31#![allow(unknown_lints)]
32#![allow(non_camel_case_types)]
33#![allow(non_snake_case)]
34#![allow(non_upper_case_globals)]
35#![allow(missing_docs)]
36#![allow(rustdoc::bare_urls)]
37#![allow(rustdoc::broken_intra_doc_links)]
38#![allow(clippy::all)]
39#![allow(unpredictable_function_pointer_comparisons)]
40
41include!(concat!(env!("OUT_DIR"), "/bindings.rs"));