[package]
name = "rig"
version.workspace = true
edition = { workspace = true }
license = "MIT"
readme = "README.md"
description = "An opinionated library for building LLM powered applications."
repository = "https://github.com/0xPlaygrounds/rig"
autoexamples = false
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[workspace]
resolver = "3"
members = [
"crates/*",
"examples/*",
]
exclude = [
"archived",
"examples/documents",
"examples/otel",
]
[workspace.lints.clippy]
dbg_macro = "forbid"
await_holding_lock = "deny"
await_holding_refcell_ref = "deny"
expect_used = "deny"
expect_fun_call = "deny"
indexing_slicing = "deny"
panic = "deny"
panic_in_result_fn = "deny"
todo = "forbid"
unimplemented = "forbid"
unreachable = "deny"
unwrap_used = "deny"
[profile.release]
lto = true
opt-level = "s"
[workspace.package]
version = "0.41.0"
edition = "2024"
[workspace.dependencies]
rig = { path = ".", version = "0.41.0" }
rig-agent = { path = "crates/rig-agent", version = "0.41.0" }
rig-core = { path = "crates/rig-core", version = "0.41.0" }
anyhow = "1.0.102"
arrow-array = "58"
as-any = "0.3.2"
assert_fs = "1.1.3"
async-stream = "0.3.6"
axum = "0.8.4"
aws-config = { version = "1.8.5", default-features = false }
aws-sdk-bedrockruntime = { version = "1.124.0", default-features = false }
aws-smithy-eventstream = "0.60.18"
aws-smithy-runtime-api = "1.11.3"
aws-smithy-types = "1.3.2"
base64 = "0.22.1"
bytes = "1.10.1"
candle-core = "0.11.0"
candle-nn = "0.11.0"
candle-transformers = "0.11.0"
chrono = "0.4"
convert_case = "0.11.0"
deranged = "=0.5.8"
dotenvy = "0.15.7"
epub = "2.1.4"
ethers = "2.0.14"
eventsource-stream = "0.2.3"
fastembed = { version = "4.9.1", default-features = false }
fastrand = "2.3.0"
futures = "0.3.32"
futures-timer = "3.0.3"
glob = "0.3.2"
google-cloud-auth = "1.10"
google-cloud-aiplatform-v1 = { version = "1.11.0", default-features = false, features = [
"prediction-service",
] }
http = "1.3.1"
httpmock = "0.8.3"
hyper-util = "0.1.14"
indexmap = "2.14.0"
indoc = "2.0.6"
lancedb = { version = "0.30", default-features = false }
log = "0.4.27"
lopdf = "0.41.0"
mime = "0.3.17"
mime_guess = "2.0.5"
mongodb = "3.7.0"
neo4rs = "0.8.0"
opentelemetry = "0.32.0"
opentelemetry-otlp = "0.32.0"
opentelemetry_sdk = "0.32.1"
ordered-float = "5.0.0"
pgvector = "0.4.2"
pin-project-lite = "0.2.16"
proc-macro2 = "1.0.95"
qdrant-client = { version = "1.14.0", default-features = false, features = [
"serde",
] }
quick-xml = "0.40.1"
quote = "1.0.40"
rayon = "1.10.0"
redis = "1.2.1"
reqwest = { version = "0.13", default-features = false }
reqwest-middleware = { version = "0.5.2", default-features = false }
reqwest-retry = "0.9"
rmcp = "2.2.0"
url = "2.5"
rusqlite = "0.32"
scylla = "1.2.0"
schemars = "1.0.4"
serde = "1.0.219"
serde_yaml = "0.9.34"
serde_json = "1.0.150"
safetensors = "0.8.0"
sha2 = "0.10.9"
serde_path_to_error = "0.1.17"
sqlite-vec = "0.1"
sqlx = "0.9.0"
surrealdb = "3.0.2"
syn = "2.0.104"
serenity = "0.12.4"
term_size = "0.3.2"
testcontainers = "0.27"
textwrap = "0.16.2"
thiserror = "2.0.12"
tokio = "1.52.3"
tokio-rusqlite = { version = "0.6.0", default-features = false }
tokio-test = "0.4.4"
tokio-stream = "0.1.17"
tokio-tungstenite = { version = "0.28.0", default-features = false }
tokenizers = { version = "0.22.2", default-features = false }
tonic = "0.14.6"
tonic-build = "0.14.6"
tonic-prost = "0.14.5"
tonic-prost-build = "0.14.6"
prost = "0.14.3"
tracing = "0.1.41"
tracing-futures = "0.2.5"
tracing-opentelemetry = "0.33.0"
tracing-subscriber = "0.3.19"
uuid = "1.17.0"
wasm-bindgen-futures = "0.4.54"
wasm-bindgen = "0.2.118"
web-time = "1.1.0"
zerocopy = "0.8.50"
[workspace.metadata.cargo-autoinherit]
exclude-members = ["crates/rig-core", "crates/rig-derive"]
[lints]
workspace = true
[dependencies]
rig-core = { path = "crates/rig-core", version = "0.41.0", default-features = false }
rig-agent = { path = "crates/rig-agent", version = "0.41.0", optional = true, default-features = false }
rig-bedrock = { path = "crates/rig-bedrock", version = "0.41.0", optional = true, default-features = false }
rig-candle = { path = "crates/rig-candle", version = "0.41.0", optional = true, default-features = false }
rig-fastembed = { path = "crates/rig-fastembed", version = "0.41.0", optional = true, default-features = false }
rig-gemini-grpc = { path = "crates/rig-gemini-grpc", version = "0.41.0", optional = true, default-features = false }
rig-helixdb = { path = "crates/rig-helixdb", version = "0.41.0", optional = true, default-features = false }
rig-lancedb = { path = "crates/rig-lancedb", version = "0.41.0", optional = true, default-features = false }
rig-memory = { path = "crates/rig-memory", version = "0.41.0", optional = true, default-features = false }
rig-derive = { path = "crates/rig-derive", version = "0.41.0", optional = true }
rig-milvus = { path = "crates/rig-milvus", version = "0.41.0", optional = true, default-features = false }
rig-mongodb = { path = "crates/rig-mongodb", version = "0.41.0", optional = true, default-features = false }
rig-neo4j = { path = "crates/rig-neo4j", version = "0.41.0", optional = true, default-features = false }
rig-postgres = { path = "crates/rig-postgres", version = "0.41.0", optional = true, default-features = false }
rig-qdrant = { path = "crates/rig-qdrant", version = "0.41.0", optional = true, default-features = false }
rig-s3vectors = { path = "crates/rig-s3vectors", version = "0.41.0", optional = true, default-features = false }
rig-scylladb = { path = "crates/rig-scylladb", version = "0.41.0", optional = true, default-features = false }
rig-sqlite = { path = "crates/rig-sqlite", version = "0.41.0", optional = true, default-features = false }
rig-surrealdb = { path = "crates/rig-surrealdb", version = "0.41.0", optional = true, default-features = false }
rig-vectorize = { path = "crates/rig-vectorize", version = "0.41.0", optional = true, default-features = false }
rig-vertexai = { path = "crates/rig-vertexai", version = "0.41.0", optional = true, default-features = false }
[dev-dependencies]
anyhow = { workspace = true }
arrow-array = { workspace = true }
assert_fs = { workspace = true }
async-stream = { workspace = true }
aws-config = { workspace = true }
aws-sdk-bedrockruntime = { workspace = true }
aws-smithy-eventstream = { workspace = true }
aws-smithy-runtime-api = { workspace = true }
aws-smithy-types = { workspace = true }
rig-core = { path = "crates/rig-core", version = "0.41.0", default-features = false, features = [
"test-utils",
] }
rig-agent = { path = "crates/rig-agent", version = "0.41.0", default-features = false, features = [
"test-utils",
] }
tokio = { workspace = true, features = ["full"] }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
tokio-test = { workspace = true }
redis = { workspace = true, features = ["tokio-comp", "aio", "vector-sets"] }
serde_path_to_error = { workspace = true }
base64 = { workspace = true }
futures = { workspace = true }
httpmock = { workspace = true, features = ["record", "proxy"] }
lancedb = { workspace = true }
mongodb = { workspace = true }
neo4rs = { workspace = true }
qdrant-client = { workspace = true }
reqwest-retry = { workspace = true }
reqwest = { workspace = true, features = ["json", "stream"] }
reqwest-middleware = { workspace = true, features = [
"json",
"multipart",
"charset",
"http2",
"rustls",
] }
schemars = { workspace = true }
serde = { workspace = true, features = ["derive"] }
sha2 = { workspace = true }
serde_json = { workspace = true, features = ["float_roundtrip"] }
serde_yaml = { workspace = true }
syn = { workspace = true, features = ["full", "visit"] }
rusqlite = { workspace = true, features = ["bundled"] }
sqlite-vec = { workspace = true }
sqlx = { workspace = true, features = ["runtime-tokio", "postgres", "uuid", "json"] }
testcontainers = { workspace = true }
thiserror = { workspace = true }
tokio-rusqlite = { workspace = true, features = ["bundled"] }
hyper-util = { workspace = true, features = ["service", "server"] }
rmcp = { workspace = true, features = [
"client",
"macros",
"reqwest",
"transport-streamable-http-client",
"transport-streamable-http-client-reqwest",
"transport-streamable-http-server-session",
"transport-streamable-http-server",
"transport-worker",
] }
axum = { workspace = true }
opentelemetry = { workspace = true }
opentelemetry_sdk = { workspace = true, features = ["rt-tokio"] }
opentelemetry-otlp = { workspace = true }
tracing = { workspace = true }
tracing-opentelemetry = { workspace = true }
url = { workspace = true }
[features]
default = ["rig-core/default", "agent", "derive", "rustls"]
agent = ["dep:rig-agent"]
test-utils = ["rig-core/test-utils", "rig-agent?/test-utils"]
facade-build-tests = []
bedrock = ["dep:rig-bedrock"]
candle = ["dep:rig-candle"]
fastembed = [
"dep:rig-fastembed",
"rig-fastembed/hf-hub",
"rig-fastembed/ort-download-binaries",
]
fastembed-hf-hub = ["dep:rig-fastembed", "rig-fastembed/hf-hub"]
fastembed-ort-download-binaries = ["dep:rig-fastembed", "rig-fastembed/ort-download-binaries"]
gemini-grpc = ["dep:rig-gemini-grpc"]
helixdb = ["dep:rig-helixdb"]
lancedb = ["dep:rig-lancedb"]
memory = ["dep:rig-memory"]
milvus = ["dep:rig-milvus"]
mongodb = ["dep:rig-mongodb"]
neo4j = ["dep:rig-neo4j"]
postgres = ["dep:rig-postgres"]
qdrant = ["dep:rig-qdrant"]
s3vectors = ["dep:rig-s3vectors"]
scylladb = ["dep:rig-scylladb"]
sqlite = ["dep:rig-sqlite"]
surrealdb = ["dep:rig-surrealdb"]
vectorize = ["dep:rig-vectorize"]
vertexai = ["dep:rig-vertexai"]
audio = ["rig-core/audio", "rig-agent?/audio"]
image = ["rig-core/image", "rig-agent?/image"]
derive = ["dep:rig-derive", "rig-core/derive", "rig-agent?/derive"]
discord-bot = ["agent", "rig-agent/discord-bot"]
pdf = ["rig-core/pdf"]
epub = ["rig-core/epub"]
rayon = ["rig-core/rayon"]
rmcp = ["agent", "rig-agent/rmcp"]
socks = ["rig-core/socks"]
reqwest = ["rig-core/reqwest"]
websocket = ["rig-core/websocket"]
websocket-rustls = ["rig-core/websocket-rustls"]
websocket-native-tls = ["rig-core/websocket-native-tls"]
rustls = [
"rig-core/rustls",
"rig-fastembed?/hf-hub-rustls-tls",
"rig-helixdb?/rustls",
"rig-lancedb?/rig-rustls",
"rig-milvus?/rustls",
]
native-tls = [
"rig-core/native-tls",
"rig-fastembed?/hf-hub-native-tls",
"rig-helixdb?/native-tls",
"rig-lancedb?/rig-native-tls",
"rig-milvus?/native-tls",
]
reqwest-middleware = ["rig-core/reqwest-middleware"]
reqwest-middleware-rustls = ["rig-core/reqwest-middleware-rustls"]
reqwest-middleware-native-tls = ["rig-core/reqwest-middleware-native-tls"]