# 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 = "rig"
version = "0.39.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "An opinionated library for building LLM powered applications."
readme = "README.md"
license = "MIT"
repository = "https://github.com/0xPlaygrounds/rig"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
audio = ["rig-core/audio"]
bedrock = ["dep:rig-bedrock"]
default = [
    "rig-core/default",
    "rustls",
]
derive = ["rig-core/derive"]
discord-bot = ["rig-core/discord-bot"]
epub = ["rig-core/epub"]
experimental = ["rig-core/experimental"]
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"]
image = ["rig-core/image"]
lancedb = ["dep:rig-lancedb"]
memory = ["dep:rig-memory"]
milvus = ["dep:rig-milvus"]
mongodb = ["dep:rig-mongodb"]
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",
]
neo4j = ["dep:rig-neo4j"]
pdf = ["rig-core/pdf"]
postgres = ["dep:rig-postgres"]
qdrant = ["dep:rig-qdrant"]
rayon = ["rig-core/rayon"]
reqwest = ["rig-core/reqwest"]
reqwest-middleware = ["rig-core/reqwest-middleware"]
reqwest-middleware-native-tls = ["rig-core/reqwest-middleware-native-tls"]
reqwest-middleware-rustls = ["rig-core/reqwest-middleware-rustls"]
rmcp = ["rig-core/rmcp"]
rustls = [
    "rig-core/rustls",
    "rig-bedrock?/bedrock-rustls",
    "rig-fastembed?/hf-hub-rustls-tls",
    "rig-helixdb?/rustls",
    "rig-lancedb?/rig-rustls",
    "rig-milvus?/rustls",
]
s3vectors = ["dep:rig-s3vectors"]
scylladb = ["dep:rig-scylladb"]
socks = ["rig-core/socks"]
sqlite = ["dep:rig-sqlite"]
surrealdb = ["dep:rig-surrealdb"]
test-utils = ["rig-core/test-utils"]
vectorize = ["dep:rig-vectorize"]
vertexai = ["dep:rig-vertexai"]
wasm = ["rig-core/wasm"]
websocket = ["rig-core/websocket"]
websocket-native-tls = ["rig-core/websocket-native-tls"]
websocket-rustls = ["rig-core/websocket-rustls"]

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

[[example]]
name = "agent"
path = "examples/agent.rs"

[[example]]
name = "agent_autonomous"
path = "examples/agent_autonomous.rs"

[[example]]
name = "agent_evaluator_optimizer"
path = "examples/agent_evaluator_optimizer.rs"

[[example]]
name = "agent_orchestrator"
path = "examples/agent_orchestrator.rs"

[[example]]
name = "agent_parallelization"
path = "examples/agent_parallelization.rs"

[[example]]
name = "agent_prompt_chaining"
path = "examples/agent_prompt_chaining.rs"

[[example]]
name = "agent_routing"
path = "examples/agent_routing.rs"

[[example]]
name = "agent_run_stepping"
path = "examples/agent_run_stepping.rs"

[[example]]
name = "agent_stream_chat"
path = "examples/agent_stream_chat.rs"

[[example]]
name = "agent_with_agent_tool"
path = "examples/agent_with_agent_tool.rs"

[[example]]
name = "agent_with_context"
path = "examples/agent_with_context.rs"

[[example]]
name = "agent_with_default_max_turns"
path = "examples/agent_with_default_max_turns.rs"

[[example]]
name = "agent_with_echochambers"
path = "examples/agent_with_echochambers.rs"

[[example]]
name = "agent_with_loaders"
path = "examples/agent_with_loaders.rs"

[[example]]
name = "agent_with_memory"
path = "examples/agent_with_memory.rs"

[[example]]
name = "agent_with_memory_streaming"
path = "examples/agent_with_memory_streaming.rs"

[[example]]
name = "agent_with_tools"
path = "examples/agent_with_tools.rs"

[[example]]
name = "agent_with_tools_otel"
path = "examples/agent_with_tools_otel.rs"

[[example]]
name = "calculator_chatbot"
path = "examples/calculator_chatbot.rs"

[[example]]
name = "chain"
path = "examples/chain.rs"

[[example]]
name = "complex_agentic_loop_claude"
path = "examples/complex_agentic_loop_claude.rs"
required-features = ["derive"]

[[example]]
name = "custom_vector_store"
path = "examples/custom_vector_store.rs"

[[example]]
name = "debate"
path = "examples/debate.rs"

[[example]]
name = "discord_bot"
path = "examples/discord_bot.rs"
required-features = ["discord-bot"]

[[example]]
name = "enum_dispatch"
path = "examples/enum_dispatch.rs"

[[example]]
name = "extractor"
path = "examples/extractor.rs"

[[example]]
name = "gemini_deep_research"
path = "examples/gemini_deep_research.rs"

[[example]]
name = "gemini_default_api_recovery"
path = "examples/gemini_default_api_recovery.rs"
required-features = ["derive"]

[[example]]
name = "gemini_extractor_with_rag"
path = "examples/gemini_extractor_with_rag.rs"
required-features = ["derive"]

[[example]]
name = "gemini_nanobanana_image_generation"
path = "examples/gemini_nanobanana_image_generation.rs"

[[example]]
name = "gemini_stream_kill_token_count"
path = "examples/gemini_stream_kill_token_count.rs"

[[example]]
name = "gemini_video_understanding"
path = "examples/gemini_video_understanding.rs"

[[example]]
name = "manual_tool_calls"
path = "examples/manual_tool_calls.rs"

[[example]]
name = "multi_agent"
path = "examples/multi_agent.rs"

[[example]]
name = "multi_extract"
path = "examples/multi_extract.rs"

[[example]]
name = "multi_turn_agent"
path = "examples/multi_turn_agent.rs"

[[example]]
name = "multi_turn_agent_extended"
path = "examples/multi_turn_agent_extended.rs"

[[example]]
name = "openai_agent_completions_api_otel"
path = "examples/openai_agent_completions_api_otel.rs"

[[example]]
name = "openai_streaming_per_call_usage"
path = "examples/openai_streaming_per_call_usage.rs"

[[example]]
name = "openai_streaming_with_tools_otel"
path = "examples/openai_streaming_with_tools_otel.rs"

[[example]]
name = "pdf_agent"
path = "examples/pdf_agent.rs"
required-features = [
    "derive",
    "pdf",
]

[[example]]
name = "rag"
path = "examples/rag.rs"
required-features = ["derive"]

[[example]]
name = "rag_dynamic_tools"
path = "examples/rag_dynamic_tools.rs"

[[example]]
name = "rag_dynamic_tools_multi_turn"
path = "examples/rag_dynamic_tools_multi_turn.rs"

[[example]]
name = "rag_ollama"
path = "examples/rag_ollama.rs"
required-features = ["derive"]

[[example]]
name = "reasoning_loop"
path = "examples/reasoning_loop.rs"

[[example]]
name = "request_hook"
path = "examples/request_hook.rs"

[[example]]
name = "reqwest_middleware"
path = "examples/reqwest_middleware.rs"
required-features = ["reqwest-middleware"]

[[example]]
name = "rmcp"
path = "examples/rmcp.rs"
required-features = ["rmcp"]

[[example]]
name = "sentiment_classifier"
path = "examples/sentiment_classifier.rs"

[[example]]
name = "transcription"
path = "examples/transcription.rs"

[[example]]
name = "vector_search"
path = "examples/vector_search.rs"
required-features = ["derive"]

[[example]]
name = "vector_search_cohere"
path = "examples/vector_search_cohere.rs"
required-features = ["derive"]

[[example]]
name = "vector_search_ollama"
path = "examples/vector_search_ollama.rs"
required-features = ["derive"]

[[test]]
name = "anthropic"
path = "tests/anthropic.rs"

[[test]]
name = "azure"
path = "tests/azure.rs"

[[test]]
name = "chatgpt"
path = "tests/chatgpt.rs"

[[test]]
name = "cohere"
path = "tests/cohere.rs"

[[test]]
name = "copilot"
path = "tests/copilot.rs"

[[test]]
name = "core"
path = "tests/core.rs"

[[test]]
name = "deepseek"
path = "tests/deepseek.rs"

[[test]]
name = "galadriel"
path = "tests/galadriel.rs"

[[test]]
name = "gemini"
path = "tests/gemini.rs"

[[test]]
name = "groq"
path = "tests/groq.rs"

[[test]]
name = "huggingface"
path = "tests/huggingface.rs"

[[test]]
name = "hyperbolic"
path = "tests/hyperbolic.rs"

[[test]]
name = "integrations"
path = "tests/integrations.rs"

[[test]]
name = "llamacpp"
path = "tests/llamacpp.rs"

[[test]]
name = "llamafile"
path = "tests/llamafile.rs"

[[test]]
name = "minimax"
path = "tests/minimax.rs"

[[test]]
name = "mira"
path = "tests/mira.rs"

[[test]]
name = "mistral"
path = "tests/mistral.rs"

[[test]]
name = "mistralrs"
path = "tests/mistralrs.rs"

[[test]]
name = "moonshot"
path = "tests/moonshot.rs"

[[test]]
name = "ollama"
path = "tests/ollama.rs"

[[test]]
name = "openai"
path = "tests/openai.rs"

[[test]]
name = "openrouter"
path = "tests/openrouter.rs"

[[test]]
name = "perplexity"
path = "tests/perplexity.rs"

[[test]]
name = "together"
path = "tests/together.rs"

[[test]]
name = "voyageai"
path = "tests/voyageai.rs"

[[test]]
name = "xai"
path = "tests/xai.rs"

[[test]]
name = "xiaomimimo"
path = "tests/xiaomimimo.rs"

[[test]]
name = "zai"
path = "tests/zai.rs"

[dependencies.rig-bedrock]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-core]
version = "0.39.0"
default-features = false

[dependencies.rig-fastembed]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-gemini-grpc]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-helixdb]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-lancedb]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-memory]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-milvus]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-mongodb]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-neo4j]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-postgres]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-qdrant]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-s3vectors]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-scylladb]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-sqlite]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-surrealdb]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-vectorize]
version = "0.39.0"
optional = true
default-features = false

[dependencies.rig-vertexai]
version = "0.39.0"
optional = true
default-features = false

[dev-dependencies.anyhow]
version = "1.0.102"

[dev-dependencies.arrow-array]
version = "58"

[dev-dependencies.assert_fs]
version = "1.1.3"

[dev-dependencies.async-stream]
version = "0.3.6"

[dev-dependencies.axum]
version = "0.8.4"

[dev-dependencies.base64]
version = "0.22.1"

[dev-dependencies.futures]
version = "0.3.32"

[dev-dependencies.httpmock]
version = "0.8.3"
features = [
    "record",
    "proxy",
]

[dev-dependencies.hyper-util]
version = "0.1.14"
features = [
    "service",
    "server",
]

[dev-dependencies.lancedb]
version = "0.30"
default-features = false

[dev-dependencies.mongodb]
version = "3.7.0"

[dev-dependencies.neo4rs]
version = "0.8.0"

[dev-dependencies.opentelemetry]
version = "0.32.0"

[dev-dependencies.opentelemetry-otlp]
version = "0.32.0"

[dev-dependencies.opentelemetry_sdk]
version = "0.32.1"
features = ["rt-tokio"]

[dev-dependencies.qdrant-client]
version = "1.14.0"
features = ["serde"]
default-features = false

[dev-dependencies.redis]
version = "1.2.1"
features = [
    "tokio-comp",
    "aio",
    "vector-sets",
]

[dev-dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "stream",
]
default-features = false

[dev-dependencies.reqwest-middleware]
version = "0.5.2"
features = [
    "json",
    "multipart",
    "charset",
    "http2",
    "rustls",
]
default-features = false

[dev-dependencies.reqwest-retry]
version = "0.9"

[dev-dependencies.rig-core]
version = "0.39.0"
features = ["test-utils"]
default-features = false

[dev-dependencies.rmcp]
version = "1.7.0"
features = [
    "client",
    "macros",
    "reqwest",
    "transport-streamable-http-client",
    "transport-streamable-http-client-reqwest",
    "transport-streamable-http-server-session",
    "transport-streamable-http-server",
    "transport-worker",
]

[dev-dependencies.rusqlite]
version = "0.32"
features = ["bundled"]

[dev-dependencies.schemars]
version = "1.0.4"

[dev-dependencies.serde]
version = "1.0.219"
features = ["derive"]

[dev-dependencies.serde_json]
version = "1.0.150"

[dev-dependencies.serde_path_to_error]
version = "0.1.17"

[dev-dependencies.serde_yaml]
version = "0.9.34"

[dev-dependencies.sqlite-vec]
version = "0.1"

[dev-dependencies.sqlx]
version = "0.8.6"
features = [
    "runtime-tokio",
    "postgres",
    "uuid",
    "json",
]

[dev-dependencies.syn]
version = "2.0.104"
features = [
    "full",
    "visit",
]

[dev-dependencies.testcontainers]
version = "0.27"

[dev-dependencies.thiserror]
version = "2.0.12"

[dev-dependencies.tokio]
version = "1.52.3"
features = ["full"]

[dev-dependencies.tokio-rusqlite]
version = "0.6.0"
features = ["bundled"]
default-features = false

[dev-dependencies.tokio-test]
version = "0.4.4"

[dev-dependencies.tracing]
version = "0.1.41"

[dev-dependencies.tracing-opentelemetry]
version = "0.33.0"

[dev-dependencies.tracing-subscriber]
version = "0.3.19"
features = ["env-filter"]

[dev-dependencies.url]
version = "2.5"

[lints.clippy]
await_holding_lock = "deny"
await_holding_refcell_ref = "deny"
dbg_macro = "forbid"
expect_fun_call = "deny"
expect_used = "deny"
indexing_slicing = "deny"
panic = "deny"
panic_in_result_fn = "deny"
todo = "forbid"
unimplemented = "forbid"
unreachable = "deny"
unwrap_used = "deny"

[profile.release]
opt-level = "s"
lto = true
