[package]
name = "llama-cpp-sys-4"
description = "Low Level Bindings to llama.cpp"
version = "0.2.38"
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",



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

    # 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",
    # All tools sources — cmake's tools/CMakeLists.txt unconditionally
    # add_subdirectory()s every tool, so all must be present.
    # Exclude server webui public/ assets (5.5 MB JS bundle, not needed for library).
    "/llama.cpp/tools/CMakeLists.txt",
    "/llama.cpp/tools/batched-bench/**/*",
    "/llama.cpp/tools/cli/**/*",
    "/llama.cpp/tools/completion/**/*",
    "/llama.cpp/tools/cvector-generator/**/*",
    "/llama.cpp/tools/export-lora/**/*",
    "/llama.cpp/tools/fit-params/**/*",
    "/llama.cpp/tools/gguf-split/**/*",
    "/llama.cpp/tools/imatrix/**/*",
    "/llama.cpp/tools/llama-bench/**/*",
    "/llama.cpp/tools/mtmd/**/*",
    "/llama.cpp/tools/parser/**/*",
    "/llama.cpp/tools/perplexity/**/*",
    "/llama.cpp/tools/quantize/**/*",
    "/llama.cpp/tools/results/**/*",
    "/llama.cpp/tools/rpc/**/*",
    "/llama.cpp/tools/server/CMakeLists.txt",
    "/llama.cpp/tools/server/server.cpp",
    "/llama.cpp/tools/server/httplib.h",
    "/llama.cpp/tools/tokenize/**/*",
    "/llama.cpp/tools/tts/**/*",

    # 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 = []
