# 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"
name = "llama-cpp-bindings"
version = "0.8.0"
build = "build.rs"
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"

[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-backends = [
    "dynamic-link",
    "llama-cpp-bindings-sys/dynamic-backends",
]
dynamic-link = ["llama-cpp-bindings-sys/dynamic-link"]
metal = ["llama-cpp-bindings-sys/metal"]
openmp = ["llama-cpp-bindings-sys/openmp"]
rocm = ["llama-cpp-bindings-sys/rocm"]
system-ggml = ["llama-cpp-bindings-sys/system-ggml"]
system-ggml-static = [
    "system-ggml",
    "llama-cpp-bindings-sys/system-ggml-static",
]
vulkan = ["llama-cpp-bindings-sys/vulkan"]

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

[dependencies.encoding_rs]
version = "=0.8.35"

[dependencies.enumflags2]
version = "=0.7.12"

[dependencies.llama-cpp-bindings-sys]
version = "=0.8.0"

[dependencies.llama-cpp-bindings-types]
version = "=0.8.0"

[dependencies.llama-cpp-log-decoder]
version = "=0.8.0"

[dependencies.llguidance]
version = "=1.7.0"

[dependencies.log]
version = "=0.4.29"

[dependencies.nom]
version = "=8.0.0"

[dependencies.serde_json]
version = "=1.0.149"

[dependencies.thiserror]
version = "=2.0.18"

[dependencies.toktrie]
version = "=1.7.0"

[dev-dependencies.serial_test]
version = "=3.4.0"

[target.'cfg(all(target_os = "macos", any(target_arch = "aarch64", target_arch = "arm64")))'.dependencies.llama-cpp-bindings-sys]
version = "=0.8.0"
features = ["metal"]

[lints.clippy]
module_name_repetitions = "allow"
used_underscore_binding = "allow"

[lints.clippy.all]
level = "deny"
priority = -1

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]
unsafe_op_in_unsafe_fn = "warn"
unused_qualifications = "warn"
