[package]
edition = "2024"
rust-version = "1.94"
name = "embedrs"
version = "0.3.0"
authors = [
"GOLIA株式会社",
"Li Hao <lihao@golia.jp>",
]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Unified embedding — cloud APIs (OpenAI, Cohere, Gemini, Voyage, Jina) + local inference, one interface"
homepage = "https://github.com/goliajp/airs"
documentation = "https://docs.rs/embedrs"
readme = "README.md"
keywords = [
"embedding",
"openai",
"cohere",
"vector",
"ai",
]
categories = ["api-bindings"]
license = "MIT"
repository = "https://github.com/goliajp/airs"
[features]
cost-tracking = ["tiktoken"]
default = []
local = [
"dep:candle-core",
"dep:candle-nn",
"dep:candle-transformers",
"dep:tokenizers",
"dep:hf-hub",
"dep:ruzstd",
]
tracing = ["dep:tracing"]
[lib]
name = "embedrs"
path = "src/lib.rs"
[[example]]
name = "benchmark"
path = "examples/benchmark.rs"
required-features = ["local"]
[[test]]
name = "backoff"
path = "tests/backoff.rs"
[[test]]
name = "batch"
path = "tests/batch.rs"
[[test]]
name = "cohere"
path = "tests/cohere.rs"
[[test]]
name = "cost_tracking"
path = "tests/cost_tracking.rs"
[[test]]
name = "fallback"
path = "tests/fallback.rs"
[[test]]
name = "gemini"
path = "tests/gemini.rs"
[[test]]
name = "jina"
path = "tests/jina.rs"
[[test]]
name = "local_cost_tracking"
path = "tests/local_cost_tracking.rs"
[[test]]
name = "local_e2e"
path = "tests/local_e2e.rs"
[[test]]
name = "openai"
path = "tests/openai.rs"
[[test]]
name = "similarity"
path = "tests/similarity.rs"
[[test]]
name = "voyage"
path = "tests/voyage.rs"
[dependencies.candle-core]
version = "0.9"
optional = true
[dependencies.candle-nn]
version = "0.9"
optional = true
[dependencies.candle-transformers]
version = "0.9"
optional = true
[dependencies.futures]
version = "0.3"
[dependencies.hf-hub]
version = "0.5"
features = ["tokio"]
optional = true
[dependencies.rand]
version = "0.9"
[dependencies.reqwest]
version = "0.13"
features = [
"json",
"rustls",
]
default-features = false
[dependencies.ruzstd]
version = "0.8"
optional = true
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.thiserror]
version = "2"
[dependencies.tiktoken]
version = "3.1"
optional = true
[dependencies.tokenizers]
version = "0.22"
features = ["onig"]
optional = true
default-features = false
[dependencies.tokio]
version = "1"
features = [
"sync",
"time",
]
[dependencies.tracing]
version = "0.1"
optional = true
[dev-dependencies.dotenvy]
version = "0.15"
[dev-dependencies.tokio]
version = "1"
features = [
"macros",
"rt-multi-thread",
]
[dev-dependencies.wiremock]
version = "0.6"