[package]
edition = "2024"
name = "llama-cpp-bindings"
version = "0.2.2"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "llama.cpp bindings for Rust"
readme = "README.md"
license = "Apache-2.0"
repository = "https://github.com/intentee/llama-cpp-bindings"
resolver = "2"
[package.metadata.docs.rs]
features = ["sampler"]
[features]
android-shared-stdcxx = ["llama-cpp-bindings-sys/shared-stdcxx"]
android-static-stdcxx = ["llama-cpp-bindings-sys/static-stdcxx"]
cuda = ["llama-cpp-bindings-sys/cuda"]
cuda-no-vmm = [
"cuda",
"llama-cpp-bindings-sys/cuda-no-vmm",
]
default = [
"openmp",
"android-shared-stdcxx",
]
dynamic-link = ["llama-cpp-bindings-sys/dynamic-link"]
llguidance = [
"dep:llguidance",
"dep:toktrie",
]
metal = ["llama-cpp-bindings-sys/metal"]
mtmd = ["llama-cpp-bindings-sys/mtmd"]
openmp = ["llama-cpp-bindings-sys/openmp"]
rocm = ["llama-cpp-bindings-sys/rocm"]
sampler = []
system-ggml = ["llama-cpp-bindings-sys/system-ggml"]
tests_that_use_llms = []
vulkan = ["llama-cpp-bindings-sys/vulkan"]
[lib]
name = "llama_cpp_bindings"
path = "src/lib.rs"
[[test]]
name = "constrained_decoding"
path = "tests/constrained_decoding.rs"
[[test]]
name = "embeddings"
path = "tests/embeddings.rs"
[[test]]
name = "multimodal"
path = "tests/multimodal.rs"
[[test]]
name = "openai_server"
path = "tests/openai_server.rs"
[[test]]
name = "openai_streaming"
path = "tests/openai_streaming.rs"
[[test]]
name = "reranker"
path = "tests/reranker.rs"
[[test]]
name = "text_generation"
path = "tests/text_generation.rs"
[[test]]
name = "tool_calling"
path = "tests/tool_calling.rs"
[dependencies.encoding_rs]
version = "0.8.35"
[dependencies.enumflags2]
version = "0.7.12"
[dependencies.llama-cpp-bindings-sys]
version = "0.2.2"
[dependencies.llguidance]
version = "1.6.1"
optional = true
[dependencies.thiserror]
version = "2"
[dependencies.toktrie]
version = "1.6.1"
optional = true
[dependencies.tracing]
version = "0.1"
[dependencies.tracing-core]
version = "0.1"
[dev-dependencies.anyhow]
version = "1.0.102"
[dev-dependencies.encoding_rs]
version = "0.8.35"
[dev-dependencies.hf-hub]
version = "0.4.3"
[dev-dependencies.serde_json]
version = "1.0"
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["json"]
[target.'cfg(all(target_os = "macos", any(target_arch = "aarch64", target_arch = "arm64")))'.dependencies.llama-cpp-bindings-sys]
version = "0.2.2"
features = ["metal"]