rig-core 0.43.0

An opinionated library for building LLM powered applications.
Documentation
# 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"
rust-version = "1.95.0"
name = "rig-core"
version = "0.43.0"
build = false
exclude = [
    "tests/macro_hygiene.rs",
    "tests/fixtures/telemetry_macro_consumer",
]
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 = []
default = [
    "derive",
    "rustls",
]
derive = ["dep:rig-derive"]
epub = [
    "dep:epub",
    "dep:quick-xml",
]
image = []
native-tls = [
    "rig-reqwest?/native-tls",
    "rig-tungstenite?/native-tls",
]
pdf = ["dep:lopdf"]
reqwest = ["dep:rig-reqwest"]
rustls = [
    "rig-reqwest?/rustls",
    "rig-tungstenite?/rustls",
]
test-utils = ["rig-http/test-utils"]
tungstenite = [
    "websocket",
    "dep:rig-tungstenite",
]
websocket = ["rig-http/websocket"]

[lib]
name = "rig_core"
path = "src/lib.rs"
doctest = true

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

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

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

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

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

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

[[test]]
name = "reqwest_no_ca_store"
path = "tests/reqwest_no_ca_store.rs"
required-features = ["reqwest"]

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

[[test]]
name = "streaming_conformance_websocket"
path = "tests/streaming_conformance_websocket.rs"
required-features = ["tungstenite"]

[[test]]
name = "websocket_handshake_rejection"
path = "tests/websocket_handshake_rejection.rs"
required-features = ["tungstenite"]

[[test]]
name = "websocket_off_runtime"
path = "tests/websocket_off_runtime.rs"
required-features = ["tungstenite"]

[dependencies.async-stream]
version = "0.3"

[dependencies.base64]
version = "0.22"

[dependencies.bytes]
version = "1"

[dependencies.epub]
version = "2"
optional = true

[dependencies.fastrand]
version = "2"

[dependencies.futures]
version = "0.3"

[dependencies.glob]
version = "0.3"

[dependencies.http]
version = "1"

[dependencies.lopdf]
version = "0.44"
features = ["rayon"]
optional = true
default-features = false

[dependencies.mime]
version = "0.3"

[dependencies.mime_guess]
version = "2"

[dependencies.ordered-float]
version = "5"

[dependencies.quick-xml]
version = "0.41"
optional = true

[dependencies.rig-derive]
version = "0.43.0"
optional = true

[dependencies.rig-http]
version = "0.43.0"

[dependencies.rig-reqwest]
version = "0.43.0"
optional = true
default-features = false

[dependencies.schemars]
version = "1"

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.54"
features = ["raw_value"]

[dependencies.sha2]
version = "0.10"

[dependencies.thiserror]
version = "2"

[dependencies.tracing]
version = "0.1"

[dependencies.url]
version = "2"

[dependencies.uuid]
version = "1"
features = [
    "v4",
    "serde",
]

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

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

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

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

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

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

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

[dev-dependencies.proptest]
version = "1"

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

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

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

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

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

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

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.lopdf]
version = "0.44"
features = [
    "rayon",
    "wasm_js",
]
optional = true
default-features = false

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.uuid]
version = "1"
features = ["js"]

[target.'cfg(not(target_family = "wasm"))'.dependencies.rig-tungstenite]
version = "0.43.0"
optional = true
default-features = false

[lints.clippy]
await_holding_lock = "deny"
await_holding_refcell_ref = "deny"
dbg_macro = "forbid"
expect_fun_call = "deny"
expect_used = "deny"
indexing_slicing = "deny"
large_enum_variant = "allow"
panic = "deny"
panic_in_result_fn = "deny"
result_large_err = "allow"
should_implement_trait = "allow"
todo = "forbid"
too_many_arguments = "allow"
type_complexity = "allow"
unimplemented = "forbid"
unreachable = "deny"
unwrap_used = "deny"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(rig_loom)"]