llama-cpp-sys-4 0.2.29

Low Level Bindings to llama.cpp
[package]
name = "llama-cpp-sys-4"
description = "Low Level Bindings to llama.cpp"
version = "0.2.29"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/eugenehp/llama-cpp-rs"
keywords = ["llama", "llm", "ggml", "gguf", "inference"]
categories = ["api-bindings", "external-ffi-bindings"]
links = "llama"

include = [
    # Crate sources
    "build.rs",
    "wrapper.h",
    "/src",

    # Feature patches (applied at build time to the llama.cpp copy in OUT_DIR)
    "/patches",

    # test files touched by the q1 patch
    "/llama.cpp/tests/test-quantize-fns.cpp",

    # llama.cpp top-level
    "/llama.cpp/CMakeLists.txt",

    # llama.cpp cmake
    "/llama.cpp/cmake",

    # llama.cpp headers & sources
    "/llama.cpp/include/llama.h",
    "/llama.cpp/include/llama-cpp.h",
    "/llama.cpp/src/**/*",
    "/llama.cpp/common/**/*",

    # ggml cmake
    "/llama.cpp/ggml/CMakeLists.txt",
    "/llama.cpp/ggml/cmake",
    "/llama.cpp/ggml/src/CMakeLists.txt",

    # ggml headers & sources
    "/llama.cpp/ggml/include/*.h",
    "/llama.cpp/ggml/src/*.h",
    "/llama.cpp/ggml/src/*.c",
    "/llama.cpp/ggml/src/*.cpp",

    # ggml legacy top-level backend files
    "/llama.cpp/ggml/src/ggml-cuda.cu",
    "/llama.cpp/ggml/src/ggml-metal.m",
    "/llama.cpp/ggml/src/ggml-metal.metal",

    # ggml backends (ggml-kompute intentionally omitted — its only content is
    # an uninitialised nested submodule with no git-tracked files, which causes
    # `cargo publish` to abort with "uncommitted changes")
    "/llama.cpp/ggml/src/ggml-blas/**/*",
    "/llama.cpp/ggml/src/ggml-cann/**/*",
    "/llama.cpp/ggml/src/ggml-cpu/**/*",
    "/llama.cpp/ggml/src/ggml-cuda/**/*",
    "/llama.cpp/ggml/src/ggml-hexagon/**/*",
    "/llama.cpp/ggml/src/ggml-hip/**/*",
    "/llama.cpp/ggml/src/ggml-metal/**/*",
    "/llama.cpp/ggml/src/ggml-musa/**/*",
    "/llama.cpp/ggml/src/ggml-opencl/**/*",
    "/llama.cpp/ggml/src/ggml-rpc/**/*",
    "/llama.cpp/ggml/src/ggml-sycl/**/*",
    "/llama.cpp/ggml/src/ggml-virtgpu/**/*",
    "/llama.cpp/ggml/src/ggml-vulkan/**/*",
    "/llama.cpp/ggml/src/ggml-webgpu/**/*",
    "/llama.cpp/ggml/src/ggml-zdnn/**/*",
    "/llama.cpp/ggml/src/ggml-zendnn/**/*",

    # ggml misc
    "/llama.cpp/ggml/src/llamafile/sgemm.h",
    "/llama.cpp/ggml/src/llamafile/sgemm.cpp",
    "/llama.cpp/ggml/src/vulkan-shaders/**/*",

    # tools (tools/CMakeLists.txt unconditionally add_subdirectory()s all of
    # these, so every subdirectory must be present even when only mtmd is
    # needed; otherwise cmake exits 1 with "not an existing directory" errors)
    "/llama.cpp/tools/CMakeLists.txt",
    # mtmd tool — full sources needed for multimodal support
    "/llama.cpp/tools/mtmd/**/*",
    # quantize tool — needed by the q1 patch
    "/llama.cpp/tools/quantize/**/*",
    # Other tools — only CMakeLists.txt stubs so cmake doesn't error on
    # add_subdirectory(); their full sources are NOT shipped to save ~8 MB.
    "/llama.cpp/tools/batched-bench/CMakeLists.txt",
    "/llama.cpp/tools/cli/CMakeLists.txt",
    "/llama.cpp/tools/completion/CMakeLists.txt",
    "/llama.cpp/tools/cvector-generator/CMakeLists.txt",
    "/llama.cpp/tools/export-lora/CMakeLists.txt",
    "/llama.cpp/tools/fit-params/CMakeLists.txt",
    "/llama.cpp/tools/gguf-split/CMakeLists.txt",
    "/llama.cpp/tools/imatrix/CMakeLists.txt",
    "/llama.cpp/tools/llama-bench/CMakeLists.txt",
    "/llama.cpp/tools/parser/CMakeLists.txt",
    "/llama.cpp/tools/perplexity/CMakeLists.txt",
    "/llama.cpp/tools/results/CMakeLists.txt",
    "/llama.cpp/tools/rpc/CMakeLists.txt",
    "/llama.cpp/tools/server/CMakeLists.txt",
    "/llama.cpp/tools/tokenize/CMakeLists.txt",
    "/llama.cpp/tools/tts/CMakeLists.txt",

    # vendor
    "/llama.cpp/vendor/**/*",
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

[build-dependencies]
bindgen = { workspace = true }
cc = { workspace = true, features = ["parallel"] }
cmake = "0.1"
glob = "0.3.3"

[target.'cfg(windows)'.build-dependencies]
winreg = "0.56"

[features]
cuda = []
metal = []
dynamic-link = []
vulkan = []
webgpu = []
blas = []
opencl = []
hip = []
native = []
openmp = []
mpi = []
rpc = []
mtmd = []
q1 = []