[[bench]]
name = "cache_benchmark"
path = "benches/cache_benchmark.rs"
[[bench]]
harness = false
name = "embeddings_bench"
path = "benches/embeddings_bench.rs"
[[bin]]
name = "embellama-server"
path = "src/bin/server.rs"
required-features = ["server"]
[dependencies.anyhow]
version = "1.0"
[dependencies.async-trait]
optional = true
version = "0.1"
[dependencies.axum]
optional = true
version = "0.8"
[dependencies.base64]
optional = true
version = "0.22"
[dependencies.byteorder]
version = "1"
[dependencies.clap]
features = ["derive", "env"]
optional = true
version = "4.4"
[dependencies.dashmap]
version = "6.0"
[dependencies.governor]
optional = true
version = "0.7"
[dependencies.llama-cpp-2]
version = "=0.1.121"
[dependencies.llama-cpp-sys-2]
version = "=0.1.121"
[dependencies.lru]
version = "0.12"
[dependencies.moka]
features = ["sync"]
version = "0.12"
[dependencies.num_cpus]
version = "1.16"
[dependencies.once_cell]
version = "1.21.3"
[dependencies.parking_lot]
version = "0.12"
[dependencies.prometheus]
optional = true
version = "0.14"
[dependencies.rand]
optional = true
version = "0.8"
[dependencies.rayon]
version = "1.8"
[dependencies.redis]
features = ["tokio-comp", "connection-manager"]
optional = true
version = "0.27"
[dependencies.self_cell]
version = "1.2.0"
[dependencies.serde]
features = ["derive"]
version = "1.0"
[dependencies.serde_json]
version = "1.0"
[dependencies.sha2]
version = "0.10"
[dependencies.subtle]
optional = true
version = "2.6"
[dependencies.sysinfo]
version = "0.33"
[dependencies.thiserror]
version = "1.0"
[dependencies.tokio]
features = ["full"]
optional = true
version = "1.44"
[dependencies.tower]
optional = true
version = "0.5"
[dependencies.tower-http]
features = ["cors", "trace"]
optional = true
version = "0.6"
[dependencies.tracing]
version = "0.1"
[dependencies.tracing-subscriber]
features = ["env-filter"]
version = "0.3"
[dependencies.uuid]
features = ["v4", "serde"]
optional = true
version = "1.11"
[dev-dependencies.axum-test]
version = "18.1"
[dev-dependencies.chrono]
features = ["serde"]
version = "0.4"
[dev-dependencies.criterion]
features = ["html_reports"]
version = "0.5"
[dev-dependencies.hyper]
features = ["full"]
version = "1.0"
[dev-dependencies.hyper-util]
version = "0.1"
[dev-dependencies.pretty_assertions]
version = "1.4"
[dev-dependencies.proptest]
version = "1.4"
[dev-dependencies.reqwest]
features = ["json", "blocking"]
version = "0.12"
[dev-dependencies.serial_test]
version = "3.0"
[dev-dependencies.tempfile]
version = "3.8"
[dev-dependencies.test-log]
features = ["trace"]
version = "0.2.18"
[dev-dependencies.tokio-test]
version = "0.4"
[[example]]
name = "batch"
path = "examples/batch.rs"
[[example]]
name = "embedded_server"
path = "examples/embedded_server.rs"
[[example]]
name = "error_handling"
path = "examples/error_handling.rs"
[[example]]
name = "simple"
path = "examples/simple.rs"
[features]
android-shared-stdcxx = ["llama-cpp-2/android-shared-stdcxx"]
cpu-optimized = ["native", "openmp"]
cuda = ["llama-cpp-2/cuda"]
cuda-backend = ["cuda"]
cuda-no-vmm = ["cuda", "llama-cpp-2/cuda-no-vmm"]
default = ["openmp"]
dynamic-link = ["llama-cpp-2/dynamic-link"]
metal = ["llama-cpp-2/metal"]
metal-backend = ["metal"]
mtmd = ["llama-cpp-2/mtmd"]
native = ["llama-cpp-2/native"]
openmp = ["llama-cpp-2/openmp"]
redis-cache = ["dep:redis", "server"]
sampler = ["llama-cpp-2/sampler"]
server = ["dep:axum", "dep:tokio", "dep:clap", "dep:async-trait", "dep:tower", "dep:tower-http", "dep:uuid", "dep:base64", "dep:governor", "dep:prometheus", "dep:rand", "dep:subtle"]
vulkan = ["llama-cpp-2/vulkan"]
vulkan-backend = ["vulkan"]
[lib]
name = "embellama"
path = "src/lib.rs"
[lints.clippy]
missing_errors_doc = "allow"
[lints.clippy.pedantic]
level = "deny"
priority = -1
[package]
authors = ["Embellama Contributors"]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = "build.rs"
categories = ["science", "api-bindings", "text-processing"]
description = "High-performance Rust library for generating text embeddings using llama-cpp"
edition = "2024"
keywords = ["embeddings", "llama", "nlp", "machine-learning", "ai"]
license = "Apache-2.0"
name = "embellama"
readme = "README.md"
repository = "https://github.com/darjus/embellama"
version = "0.8.0"
[package.metadata.docs.rs]
features = ["server", "openmp"]
targets = ["x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-pc-windows-msvc"]
[profile.bench]
inherits = "release"
[profile.release]
codegen-units = 1
lto = true
opt-level = 3
panic = "abort"
[[test]]
name = "backend_tests"
path = "tests/backend_tests.rs"
[[test]]
name = "cache_integration_tests"
path = "tests/cache_integration_tests.rs"
[[test]]
name = "cache_management_tests"
path = "tests/cache_management_tests.rs"
[[test]]
name = "cache_tests"
path = "tests/cache_tests.rs"
[[test]]
name = "common"
path = "tests/common.rs"
[[test]]
name = "concurrency_tests"
path = "tests/concurrency_tests.rs"
[[test]]
name = "context_size_tests"
path = "tests/context_size_tests.rs"
[[test]]
name = "effective_max_tokens_test"
path = "tests/effective_max_tokens_test.rs"
[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"
[[test]]
name = "jina_model_batch_overflow_test"
path = "tests/jina_model_batch_overflow_test.rs"
[[test]]
name = "openai_compat_tests"
path = "tests/openai_compat_tests.rs"
[[test]]
name = "prefix_cache_tests"
path = "tests/prefix_cache_tests.rs"
[[test]]
name = "property_tests"
path = "tests/property_tests.rs"
[[test]]
name = "server_api_tests"
path = "tests/server_api_tests.rs"
[[test]]
name = "server_library_test"
path = "tests/server_library_test.rs"
[[test]]
name = "server_load_tests"
path = "tests/server_load_tests.rs"
[[test]]
name = "server_test_helpers"
path = "tests/server_test_helpers.rs"