[package]
name = "embedrs"
version = "0.3.1"
edition.workspace = true
rust-version.workspace = true
description = "Unified embedding — cloud APIs (OpenAI, Cohere, Gemini, Voyage, Jina) + local inference, one interface"
license.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
documentation = "https://docs.rs/embedrs"
keywords = ["embedding", "openai", "cohere", "vector", "ai"]
categories = ["api-bindings"]
readme = "README.md"

[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] }
tokio = { version = "1", features = ["sync", "time"] }
thiserror = "2"
rand = "0.10"
futures = "0.3"
tracing = { version = "0.1", optional = true }
tiktoken = { path = "../tiktoken", version = "3.1", optional = true }
candle-core = { version = "0.10", optional = true }
candle-nn = { version = "0.10", optional = true }
candle-transformers = { version = "0.10", optional = true }
tokenizers = { version = "0.22", optional = true, default-features = false, features = ["onig"] }
hf-hub = { version = "0.5", optional = true, features = ["tokio"] }
ruzstd = { version = "0.8", optional = true }

[features]
default = []
tracing = ["dep:tracing"]
cost-tracking = ["tiktoken"]
local = ["dep:candle-core", "dep:candle-nn", "dep:candle-transformers", "dep:tokenizers", "dep:hf-hub", "dep:ruzstd"]

[[example]]
name = "benchmark"
required-features = ["local"]

[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
wiremock = "0.6"
dotenvy = "0.15"
