ik-llama-cpp-sys 0.1.5

Low level bindings to ik_llama.cpp (ikawrakow's SOTA-quant fork)
Documentation
//! Low-level FFI bindings to `ik_llama.cpp` (ikawrakow's SOTA-quant fork of llama.cpp).
//!
//! The bindings are generated by `bindgen` in `build.rs` against the vendored
//! `ik_llama.cpp/include/llama.h` + `ggml/include/gguf.h` and included below.
#![allow(
    non_upper_case_globals,
    non_camel_case_types,
    non_snake_case,
    dead_code,
    unnecessary_transmutes,
    unpredictable_function_pointer_comparisons,
    clippy::all,
    clippy::pedantic
)]

include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

/// Multimodal (`mtmd_*`) FFI bindings, generated by a dedicated C++-mode bindgen
/// pass (see `build.rs::generate_mtmd_bindings`). Gated behind the `mtmd` feature.
///
/// The mtmd pass emits **only** `mtmd_*` items and references the shared
/// `llama_*`/`ggml_*` types by bare name; `use super::*` below resolves those to
/// the main bindings above, so there is no duplicate/clashing type definition.
#[cfg(feature = "mtmd")]
mod mtmd_bindings {
    #![allow(
        non_upper_case_globals,
        non_camel_case_types,
        non_snake_case,
        dead_code,
        unnecessary_transmutes,
        unpredictable_function_pointer_comparisons,
        clippy::all,
        clippy::pedantic
    )]
    // Resolve blocklisted llama/ggml/gguf types referenced by the mtmd_* items
    // (e.g. `llama_model`, `llama_context`, `llama_token`, `llama_pos`,
    // `ggml_log_level`, `llama_flash_attn_type`, `ggml_type`) to the main
    // bindings included at the crate root above.
    use super::*;
    include!(concat!(env!("OUT_DIR"), "/mtmd_bindings.rs"));
}

// Re-export the `mtmd_*` items at the crate root. This is a `pub use` of the
// module's own public defs only (the private `use super::*` glob above is not
// re-exported), and the mtmd pass emits no `llama_*`/`ggml_*` defs, so nothing
// clashes with the main bindings.
#[cfg(feature = "mtmd")]
pub use mtmd_bindings::*;