rig-llama-cpp 0.1.1

Rig completion provider for local GGUF models via llama.cpp, with streaming, tool calling, reasoning, and multimodal (mtmd) support.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.88"
name = "rig-llama-cpp"
version = "0.1.1"
build = false
exclude = [
    ".github/",
    "CLAUDE.md",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rig completion provider for local GGUF models via llama.cpp, with streaming, tool calling, reasoning, and multimodal (mtmd) support."
homepage = "https://github.com/camperking/rig-llama-cpp"
documentation = "https://docs.rs/rig-llama-cpp"
readme = "README.md"
keywords = [
    "llm",
    "llama-cpp",
    "gguf",
    "inference",
    "rig",
]
categories = [
    "api-bindings",
    "science",
]
license = "MIT"
repository = "https://github.com/camperking/rig-llama-cpp"

[package.metadata.docs.rs]
features = ["mtmd"]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
cuda = ["llama-cpp-2/cuda"]
default = []
metal = ["llama-cpp-2/metal"]
mtmd = [
    "llama-cpp-2/mtmd",
    "dep:base64",
]
openmp = ["llama-cpp-2/openmp"]
rocm = ["llama-cpp-2/rocm"]
vulkan = ["llama-cpp-2/vulkan"]

[lib]
name = "rig_llama_cpp"
path = "src/lib.rs"

[[example]]
name = "completion"
path = "examples/completion.rs"

[[example]]
name = "embeddings"
path = "examples/embeddings.rs"

[[example]]
name = "kv_cache"
path = "examples/kv_cache.rs"

[[example]]
name = "reload"
path = "examples/reload.rs"

[[example]]
name = "stream_chat"
path = "examples/stream_chat.rs"

[[example]]
name = "stream_chat_tools"
path = "examples/stream_chat_tools.rs"

[[example]]
name = "streaming"
path = "examples/streaming.rs"

[[example]]
name = "structured_output"
path = "examples/structured_output.rs"

[[example]]
name = "vision"
path = "examples/vision.rs"

[[test]]
name = "e2e"
path = "tests/e2e/main.rs"

[dependencies.base64]
version = "0.22"
optional = true

[dependencies.chrono]
version = "0.4.44"

[dependencies.encoding_rs]
version = "0.8"

[dependencies.llama-cpp-2]
version = "0.1.146"
default-features = false

[dependencies.llama-cpp-sys-2]
version = "0.1.146"
default-features = false

[dependencies.log]
version = "0.4"

[dependencies.rig-core]
version = "0.36.0"

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.thiserror]
version = "2.0.18"

[dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "macros",
    "sync",
]

[dependencies.tokio-stream]
version = "0.1"

[dev-dependencies.anyhow]
version = "1"

[dev-dependencies.hf-hub]
version = "0.4"
features = [
    "ureq",
    "native-tls",
]
default-features = false

[dev-dependencies.schemars]
version = "1"

[dev-dependencies.serial_test]
version = "3"
features = ["async"]
default-features = false