[package]
edition = "2024"
name = "rig-core"
version = "0.35.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]
all = [
"derive",
"pdf",
"rayon",
]
audio = []
default = [
"reqwest",
"rustls",
]
derive = ["dep:rig-derive"]
discord-bot = ["dep:serenity"]
epub = [
"dep:epub",
"dep:quick-xml",
]
experimental = []
image = []
native-tls = [
"reqwest/native-tls",
"tokio-tungstenite?/native-tls",
]
pdf = ["dep:lopdf"]
rayon = ["dep:rayon"]
reqwest = [
"reqwest/charset",
"reqwest/http2",
"reqwest/system-proxy",
]
reqwest-middleware = ["dep:reqwest-middleware"]
reqwest-middleware-native-tls = [
"dep:reqwest-middleware",
"native-tls",
"reqwest/native-tls",
]
reqwest-middleware-rustls = [
"dep:reqwest-middleware",
"rustls",
"reqwest-middleware/rustls",
]
rmcp = ["dep:rmcp"]
rustls = [
"reqwest/rustls",
"tokio-tungstenite?/rustls-tls-webpki-roots",
]
socks = ["reqwest/socks"]
wasm = [
"dep:wasm-bindgen-futures",
"futures-timer/wasm-bindgen",
"getrandom/js",
]
websocket = ["dep:tokio-tungstenite"]
[lib]
name = "rig"
path = "src/lib.rs"
doctest = false
[[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_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_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_extractor_with_rag"
path = "examples/gemini_extractor_with_rag.rs"
required-features = ["derive"]
[[example]]
name = "gemini_video_understanding"
path = "examples/gemini_video_understanding.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_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 = "cohere"
path = "tests/cohere.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 = "llamacpp"
path = "tests/llamacpp.rs"
[[test]]
name = "llamafile"
path = "tests/llamafile.rs"
[[test]]
name = "mira"
path = "tests/mira.rs"
[[test]]
name = "mistral"
path = "tests/mistral.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"
[dependencies.as-any]
version = "0.3.2"
[dependencies.async-stream]
version = "0.3.6"
[dependencies.base64]
version = "0.22.1"
[dependencies.bytes]
version = "1.10.1"
[dependencies.epub]
version = "2.1.4"
optional = true
[dependencies.eventsource-stream]
version = "0.2.3"
[dependencies.fastrand]
version = "2.3.0"
[dependencies.futures]
version = "0.3.32"
[dependencies.futures-timer]
version = "3.0.3"
[dependencies.getrandom]
version = "0.2"
optional = true
[dependencies.glob]
version = "0.3.2"
[dependencies.http]
version = "1.3.1"
[dependencies.lopdf]
version = "0.36.0"
optional = true
[dependencies.mime]
version = "0.3.17"
[dependencies.mime_guess]
version = "2.0.5"
[dependencies.nanoid]
version = "0.4"
[dependencies.ordered-float]
version = "5.0.0"
[dependencies.pin-project-lite]
version = "0.2.16"
[dependencies.quick-xml]
version = "0.39.2"
optional = true
[dependencies.rayon]
version = "1.10.0"
optional = true
[dependencies.reqwest]
version = "0.13"
features = [
"json",
"stream",
"multipart",
]
default-features = false
[dependencies.reqwest-middleware]
version = "0.5.1"
features = [
"json",
"multipart",
"charset",
"http2",
]
optional = true
[dependencies.rig-derive]
version = "0.1.12"
optional = true
[dependencies.rmcp]
version = "1"
features = ["client"]
optional = true
[dependencies.schemars]
version = "1.0.4"
[dependencies.serde]
version = "1.0.219"
features = ["derive"]
[dependencies.serde_json]
version = "1.0.140"
[dependencies.serenity]
version = "0.12.4"
optional = true
[dependencies.thiserror]
version = "2.0.12"
[dependencies.tokio]
version = "1.51.1"
features = [
"rt",
"sync",
]
[dependencies.tracing]
version = "0.1.41"
[dependencies.tracing-futures]
version = "0.2.5"
features = ["futures-03"]
[dependencies.url]
version = "2.5"
[dependencies.wasm-bindgen-futures]
version = "0.4.54"
optional = true
[dev-dependencies.anyhow]
version = "1.0.102"
[dev-dependencies.assert_fs]
version = "1.1.3"
[dev-dependencies.axum]
version = "0.8.4"
[dev-dependencies.base64]
version = "0.22.1"
[dev-dependencies.hyper-util]
version = "0.1.14"
features = [
"service",
"server",
]
[dev-dependencies.opentelemetry]
version = "0.30.0"
[dev-dependencies.opentelemetry-otlp]
version = "0.30.0"
[dev-dependencies.opentelemetry_sdk]
version = "0.30.0"
features = ["rt-tokio"]
[dev-dependencies.redis]
version = "1.0.2"
features = [
"tokio-comp",
"aio",
"vector-sets",
]
[dev-dependencies.reqwest-middleware]
version = "0.5"
features = [
"json",
"multipart",
"charset",
"http2",
]
[dev-dependencies.reqwest-retry]
version = "0.9"
[dev-dependencies.rmcp]
version = "1"
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.serde_path_to_error]
version = "0.1.17"
[dev-dependencies.tokio]
version = "1.51.1"
features = ["full"]
[dev-dependencies.tokio-test]
version = "0.4.4"
[dev-dependencies.tracing-opentelemetry]
version = "0.31.0"
[dev-dependencies.tracing-subscriber]
version = "0.3.19"
features = ["env-filter"]
[target.'cfg(not(target_family = "wasm"))'.dependencies.tokio-tungstenite]
version = "0.23.1"
optional = true
[lints.clippy]
dbg_macro = "forbid"
todo = "forbid"
unimplemented = "forbid"