Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
572 lines (556 loc) · 24.1 KB
/
Copy pathCargo.toml
File metadata and controls
572 lines (556 loc) · 24.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
[package]
name = "rig"
version.workspace = true
edition = { workspace = true }
rust-version = { workspace = true }
license = "MIT"
readme = "README.md"
description = "An opinionated library for building LLM powered applications."
repository = "https://github.com/0xPlaygrounds/rig"
# Examples now live in their own packages under `examples/*`; don't auto-discover
# them as examples of this crate.
autoexamples = false
# The published tarball no longer sweeps the provider cassettes: they live with
# the engine that reads them (`crates/rig-cassette/fixtures/cassettes`), which
# Cargo skips here because it is its own package.
#
# This manifest is both the workspace root and the `rig` facade package, so the
# package directory is the whole repository and `cargo package` sweeps it: CI
# workflows, README artwork, the Nix flake, release tooling, `examples/` data
# and a `tests/` tree that cannot compile from the tarball at all, since its
# `rig-test-support` dev dependency is path-only and Cargo strips it when
# publishing. The facade's own source is one file of re-exports.
#
# An allowlist, not an exclude list (#2349): "not shipped" is the safe default,
# so this does not need extending every time the repository grows a directory,
# and it is the only form that keeps out untracked-but-unignored files - cargo
# packages whatever happens to be lying next to the manifest at publish time.
#
# NOTE: this is [package].include and must stay ABOVE the [workspace] header.
# Below it, it parses as `workspace.include` and is ignored with only an
# unused-key warning. The `exclude` further down is [workspace].exclude, which
# is member discovery - a different key. `include` and `exclude` cannot coexist
# on [package]: `include` wins and `exclude` goes inert.
#
# Patterns need the leading `/`. Cargo's globs are gitignore-style and match at
# any depth, so an unanchored "README.md" would also pull in
# `examples/README.md` and `tests/README.md`.
#
# LICENSE must be listed explicitly: `license = "MIT"` is an SPDX expression,
# not `license-file`, so cargo does not add the file on its own.
#
# Packaging emits a `warning: ignoring test 'x'` line per test target. Do NOT
# silence those with `autotests = false`: that stops local discovery too and
# recreates the "tests run in no CI job" hole in the `default-members` comment
# below (#2258). `cargo xtask check-packaging` gates the result.
include = [
"/src/**",
"/README.md",
"/LICENSE",
"/CHANGELOG.md",
"/MIGRATING.md",
# Referenced by README.md, which registries render from the tarball. The
# other five img/ files are referenced by nothing and stay out.
"/img/rig-rebranded-logo-white.svg",
"/img/rig-rebranded-logo-black.svg",
"/img/built-by-playgrounds.svg",
"/img/ryzome-bg.png",
]
# docs.rs builds with a current nightly, on which `surrealdb`'s `diskann`
# dependency does not compile, so every feature but `surrealdb` is documented.
# `cargo xtask check-packaging` requires the list to cover every other feature.
[package.metadata.docs.rs]
features = [
"agent",
"bedrock",
"candle",
"cassette",
"cli",
"derive",
"epub",
"fastembed",
"fastembed-hf-hub",
"fastembed-ort-download-binaries",
"gemini-grpc",
"helixdb",
"lancedb",
"memory",
"milvus",
"mongodb",
"native-tls",
"neo4j",
"pdf",
"postgres",
"qdrant",
"reqwest",
"reqwest-middleware",
"reqwest-middleware-native-tls",
"reqwest-middleware-rustls",
"rmcp",
"rustls",
"s3vectors",
"scylladb",
"socks",
"sqlite",
"test-utils",
"typesafeai",
"vectorize",
"vertexai",
"websocket",
"websocket-native-tls",
"websocket-rustls",
]
rustdoc-args = ["--cfg", "docsrs"]
[workspace]
resolver = "3"
members = [
"crates/*",
# The rig agent's plugin crates, built on rig-harness's public API.
"plugins/*",
# The plugin corpus: plugins written to shape and prove the kernel.
"corpus/*",
"crates/rig-cassette/tests/minimal",
"examples/*",
"xtask",
"test-support/service-tests",
"test-support/rig-test-support",
"test-support/rig-history-conformance",
"test-support/rig-harness-test-support",
"test-support/rig-defaults-test-support",
]
# The root manifest is itself the `rig` facade package, so without an
# explicit `default-members` a bare `cargo nextest run` resolved to the
# facade alone and every `crates/*` unit test ran only where a CI step named
# its package (#2258: ~1,200 rig-core lib unit tests executed in no step).
# The default set is the facade plus the crates whose unit tests must always
# run; the service-backed vector-store integrations and examples stay
# opt-in.
# rig-derive is deliberately absent: a proc-macro crate's test binary links
# libstd dynamically, which breaks under toolchains installed without the
# dylib component. Absent from the default set is not absent from CI — its
# own suite (trybuild cases and the dependency-rename fixtures) runs in the
# `stable / test rig-derive` job, which names `-p rig-derive` explicitly, and
# the macro-hygiene consumer runs in the `test guards` job's
# `macro-hygiene` check (the `macro_hygiene` suite of rig-core's tests). Both are required for
# this exclusion to stay honest: until the first existed, every test in
# rig-derive ran nowhere.
# The nested cassette runner is selected separately by bus-verification:
# default-member feature unification defeats its minimal JSON graph.
default-members = [
".",
"crates/rig-core",
"crates/rig-cassette",
"crates/rig-agent",
"crates/rig-http",
"crates/rig-reqwest",
"crates/rig-tungstenite",
"crates/rig-typesafeai",
"crates/rig-bedrock",
"crates/rig-candle",
"crates/rig-gemini-grpc",
"test-support/service-tests",
"test-support/rig-test-support",
"test-support/rig-history-conformance",
# The design record's Frozen API programs: clippy and the full test
# lane compile them.
"examples/frozen_api",
]
exclude = [
# Data/infra dirs under examples/ that are not Cargo packages.
"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"
# Size and shape heuristics, not correctness: in this tree each one only ever
# produced a suppression, a box inside a public enum variant, or a type alias
# that shortened a signature instead of naming a concept.
large_enum_variant = "allow"
result_large_err = "allow"
type_complexity = "allow"
too_many_arguments = "allow"
should_implement_trait = "allow"
# Line tables keep file and line numbers in backtraces of workspace code while
# emitting far less debuginfo, so linking the test binaries is faster.
[profile.dev]
debug = "line-tables-only"
# Dependency debuginfo dominates the target directory and link time, and
# dependency frames are rarely read. DEVELOPING.md shows how to restore it.
[profile.dev.package."*"]
debug = false
[profile.release]
lto = true
opt-level = "s"
[workspace.package]
version = "0.47.0"
edition = "2024"
# The toolchain in rust-toolchain.toml, the only one CI builds with.
rust-version = "1.97.1"
[workspace.dependencies]
# Every requirement below is a FLOOR, not a pin: `tokio = "1"` means `^1`,
# and a downstream resolves anywhere inside that range — usually to whatever
# its own lockfile already holds. So each floor is the lowest version rig's
# own code needs, to the best it can be verified: a bare major (or `0.minor`)
# where rig uses only long-stable API, and `major.minor[.patch]` only where a
# feature or API rig relies on first appeared (each such floor says which).
# Do not raise a floor because a newer release exists — Dependabot is
# configured (`versioning-strategy: increase-if-necessary`) to move only
# `Cargo.lock` for in-range releases, and every rig release used to ship the
# raised floors, forcing downstream users to `cargo update` a dozen crates
# just to take a point release (#2195). Raise a floor when rig starts using
# an API the old floor lacks, and say so in the changelog.
# `scripts/check-dependency-floors.py` (CI: `stable / dependency floors`)
# downgrades every direct dependency to its floor and builds the workspace,
# so a floor that has silently rotted fails there rather than downstream.
#
# The `rig` facade is the workspace-root package; examples depend on it via
# `rig.workspace = true` (add per-example features at the use site).
rig = { path = ".", version = "0.47.0" }
rig-agent = { path = "crates/rig-agent", version = "0.47.0" }
rig-reqwest = { path = "crates/rig-reqwest", version = "0.47.0" }
rig-rmcp = { path = "crates/rig-rmcp", version = "0.47.0" }
rig-core = { path = "crates/rig-core", version = "0.47.0" }
rig-cassette = { path = "crates/rig-cassette", version = "0.47.0", default-features = false }
anyhow = "1"
arrow-array = "58"
# 58.2: decodes `FixedSizeList` columns, which rig-lancedb inserts embeddings through.
arrow-json = "58.2"
assert_fs = "1"
# 2.3: `force_send`, which Bevy Remote answers an in-process request with
# (`BrpMessage::sender`).
async-channel = "2.3"
async-stream = "0.3"
axum = "0.8"
aws-config = { version = "1", default-features = false }
# 1.124: `OutputConfig`/`ServiceTier`/citations types rig-bedrock maps.
aws-sdk-bedrockruntime = { version = "1.124", default-features = false }
aws-smithy-eventstream = "0.61"
aws-smithy-http-client = { version = "1", default-features = false }
aws-smithy-runtime-api = "1"
aws-smithy-types = "1"
base64 = "0.23.1"
# Bevy is pinned exactly: a Bevy plugin only links against the one Bevy
# version of its app, and rig-harness is the app. `bevy_tasks` is also the
# runtime-agnostic executor of the `agent_no_tokio` example. crates.io, never
# git; the tooling check verifies Bevy sources, and that these requirements
# are `rig_harness_protocol::BEVY_VERSION`, the version the launcher enforces.
# `bevy` itself only for `MinimalPlugins` (in `bevy_internal`, no feature
# needed); default features off keeps render, window and audio out.
# `bevy_remote` without `http`, `bevy_asset` or `bevy_render`: in-process
# BRP only, never a server. `reflect_documentation` puts doc comments in
# the type registry.
bevy = { version = "=0.20.1", default-features = false }
bevy_app = { version = "=0.20.1", default-features = false, features = ["std", "bevy_reflect", "reflect_auto_register"] }
bevy_ecs = { version = "=0.20.1", default-features = false, features = ["std", "multi_threaded", "bevy_reflect", "reflect_auto_register"] }
bevy_log = "=0.20.1"
bevy_reflect = { version = "=0.20.1", default-features = false, features = ["std", "auto_register_inventory", "reflect_documentation"] }
bevy_remote = { version = "=0.20.1", default-features = false }
bevy_tasks = { version = "=0.20.1", default-features = false, features = ["multi_threaded"] }
bevy_time = { version = "=0.20.1", default-features = false, features = ["std", "bevy_reflect"] }
bytes = "1"
candle-core = "0.11.1"
candle-nn = "0.11.1"
candle-transformers = "0.11.1"
chrono = "0.4"
convert_case = "0.11"
crossbeam-channel = "0.5.15"
crossterm = "0.29"
# Benchmarks (`benches/`, compiled in CI, never run there). 0.1.15: timings
# net of the allocation counter (`AllocProfiler`).
divan = "0.1.15"
ctrlc = "3.4.4"
dotenvy = "0.15"
epub = "2.1.6"
# 4.5: the `hf-hub-*` feature split rig-fastembed forwards.
fastembed = { version = "4.5", default-features = false }
fastrand = "2"
futures = "0.3"
futures-timer = "3"
glob = "0.3"
google-cloud-auth = "1"
google-cloud-gax = "1"
# 1.7: `ThinkingLevel`, `ImageConfig`, `FunctionResponse{Blob,FileData}`.
# 1.8: `generate_content_response::UsageMetadata::tool_use_prompt_tokens_details`.
google-cloud-aiplatform-v1 = { version = "1.8", default-features = false, features = [
"prediction-service",
] }
http = "1"
http-body = "1"
httpdate = "1"
# 0.8.2: `Recording::export_async` (cassette harness).
httpmock = "0.8.2"
ignore = "0.4.25"
# Decodes the JPEG frames of rig-candle's pose test and example.
image = { version = "0.25.10", default-features = false }
indexmap = "2"
lancedb = { version = "0.30", default-features = false }
libc = "0.2.186"
log = "0.4"
lopdf = { version = "0.44", default-features = false, features = ["rayon"] }
memchr = "2"
mime = "0.3"
mime_guess = "2"
# 3.4.1: `Client::append_metadata`, which rig-mongodb tags its handshake with.
mongodb = "3.4.1"
neo4rs = "0.8"
# rig-tools' `Local::watch`: file events instead of polling.
notify = "8"
opentelemetry = "0.32"
opentelemetry-otlp = "0.32"
opentelemetry_sdk = "0.32"
ordered-float = "5"
# 0.4.2: the first release whose `sqlx` feature accepts sqlx 0.9.
pgvector = "0.4.2"
proc-macro2 = "1"
pulldown-cmark = { version = "0.13", default-features = false }
# 1.10: the `Qdrant` client, `Payload`, and the query/upsert builders.
qdrant-client = { version = "1.10", default-features = false, features = [
"serde",
] }
quick-xml = "0.41"
quote = "1"
ratatui = "0.30.2"
ratatui-core = { version = "0.1.2", features = ["std"] }
redis = "1"
regex = "1.12.3"
reqwest = { version = "0.13", default-features = false }
reqwest-middleware = { version = "0.5", default-features = false }
reqwest-retry = "0.9"
rmcp = "3.9"
url = "2"
rusqlite = "0.32"
scylla = "1"
schemars = "1"
serde = "1.0.181"
serde_yaml = "0.9"
# 1.0.54: the `float_roundtrip` feature.
serde_json = "1.0.54"
safetensors = "0.8"
sha2 = "0.11.1"
signal-hook = "0.4.6"
similar = "3.2.1"
syntect = { version = "5.3", default-features = false, features = ["parsing", "regex-fancy"] }
terminal-colorsaurus = "1.0"
two-face = { version = "0.5", default-features = false, features = ["syntect-fancy"] }
serde_path_to_error = "0.1"
sqlite-vec = "0.1"
sqlx = "0.9"
# 0.8.3: `Engine::new_sandboxed` and the thread state controller rig-steel uses.
steel-core = "0.8.3"
# At least 3.2.5: earlier releases no longer build against the newest
# `surrealdb-core` their requirement accepts.
surrealdb = "3.3.5"
syn = "3"
term_size = "0.3"
testcontainers = "0.28.0"
textwrap = "0.16"
thiserror = "2"
tokio = "1"
tokio-rusqlite = { version = "0.6", default-features = false }
tokio-test = "0.4"
tokio-tungstenite = { version = "0.29", default-features = false }
toml = "1"
toml_edit = "0.25"
tokenizers = { version = "0.23", default-features = false }
tonic = "0.14"
tonic-build = "0.14"
tonic-prost = "0.14"
tonic-prost-build = "0.14"
prost = "0.14"
prost-reflect = { version = "0.16", features = ["serde"] }
prost-types = "0.14"
tracing = "0.1"
# 0.2.5: `Instrumented<S>: Stream` under `futures-03` for futures 0.3 stable.
tracing-futures = "0.2.5"
tracing-opentelemetry = "0.33"
tracing-subscriber = "0.3"
unicode-segmentation = "1.13"
unicode-width = "0.2"
uuid = "1"
wasm-bindgen-futures = "0.4"
wasm-bindgen = "0.2"
web-time = "1"
webpki-root-certs = "1"
[workspace.metadata.cargo-autoinherit]
# Skip cargo-autoinherit for these packages
exclude-members = ["crates/rig-core", "crates/rig-derive"]
[lints]
workspace = true
# The launcher (rig-cli), so `cargo install rig` installs the `rig` command.
# `doc = false`: it shares the library's name, so its docs would overwrite the
# library's.
[[bin]]
name = "rig"
path = "src/main.rs"
required-features = ["cli"]
doc = false
[dependencies]
rig-typesafeai = { path = "crates/rig-typesafeai", version = "0.47.0", optional = true, default-features = false }
rig-core = { path = "crates/rig-core", version = "0.47.0", default-features = false }
rig-cassette = { path = "crates/rig-cassette", version = "0.47.0", optional = true, default-features = false }
rig-reqwest = { path = "crates/rig-reqwest", version = "0.47.0", optional = true, default-features = false }
rig-agent = { path = "crates/rig-agent", version = "0.47.0", optional = true, default-features = false }
rig-rmcp = { path = "crates/rig-rmcp", version = "0.47.0", optional = true }
rig-bedrock = { path = "crates/rig-bedrock", version = "0.47.0", optional = true, default-features = false }
rig-candle = { path = "crates/rig-candle", version = "0.47.0", optional = true, default-features = false }
rig-fastembed = { path = "crates/rig-fastembed", version = "0.47.0", optional = true, default-features = false }
rig-gemini-grpc = { path = "crates/rig-gemini-grpc", version = "0.47.0", optional = true, default-features = false }
rig-helixdb = { path = "crates/rig-helixdb", version = "0.47.0", optional = true, default-features = false }
rig-lancedb = { path = "crates/rig-lancedb", version = "0.47.0", optional = true, default-features = false }
rig-memory = { path = "crates/rig-memory", version = "0.47.0", optional = true, default-features = false }
rig-derive = { path = "crates/rig-derive", version = "0.47.0", optional = true }
rig-milvus = { path = "crates/rig-milvus", version = "0.47.0", optional = true, default-features = false }
rig-mongodb = { path = "crates/rig-mongodb", version = "0.47.0", optional = true, default-features = false }
rig-neo4j = { path = "crates/rig-neo4j", version = "0.47.0", optional = true, default-features = false }
rig-postgres = { path = "crates/rig-postgres", version = "0.47.0", optional = true, default-features = false }
rig-qdrant = { path = "crates/rig-qdrant", version = "0.47.0", optional = true, default-features = false }
rig-s3vectors = { path = "crates/rig-s3vectors", version = "0.47.0", optional = true, default-features = false }
rig-scylladb = { path = "crates/rig-scylladb", version = "0.47.0", optional = true, default-features = false }
rig-sqlite = { path = "crates/rig-sqlite", version = "0.47.0", optional = true, default-features = false }
rig-surrealdb = { path = "crates/rig-surrealdb", version = "0.47.0", optional = true, default-features = false }
rig-vectorize = { path = "crates/rig-vectorize", version = "0.47.0", optional = true, default-features = false }
rig-vertexai = { path = "crates/rig-vertexai", version = "0.47.0", optional = true, default-features = false }
# The bundled websocket backend is native-only (tungstenite needs a tokio
# reactor and raises a `compile_error!` on wasm), so it is scoped to non-wasm
# targets. On wasm, `websocket` then adds nothing and still compiles, and a
# browser backend is written against `rig::ws_client`, the escape hatch the
# backend's own wasm error message prescribes.
#
# Not `default-features = false`, unlike the other optional companions: the
# backend's own `default = ["rustls"]` is what guarantees that enabling
# `websocket` always yields a socket that can do `wss://`. Turning defaults off
# here would let `--no-default-features --features websocket` compile a
# TLS-less backend that fails every handshake at runtime.
[target.'cfg(not(target_family = "wasm"))'.dependencies]
rig-tungstenite = { path = "crates/rig-tungstenite", version = "0.47.0", optional = true }
# The launcher starts and signals processes, so it is native-only too.
rig-cli = { path = "crates/rig-cli", version = "0.47.0", optional = true }
[dev-dependencies]
rig-test-support = { path = "test-support/rig-test-support" }
rig-history-conformance = { path = "test-support/rig-history-conformance" }
# The facade's tests use the recorder directly, whatever `cassette` is set to.
rig-cassette = { path = "crates/rig-cassette", default-features = false, features = ["agent"] }
anyhow = { workspace = true }
assert_fs = { workspace = true }
rig-core = { path = "crates/rig-core", version = "0.47.0", default-features = false, features = [
"test-utils",
] }
rig-agent = { path = "crates/rig-agent", version = "0.47.0", default-features = false, features = [
"test-utils",
] }
tokio = { workspace = true, features = ["full"] }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
base64 = { workspace = true }
bytes = { workspace = true }
futures = { workspace = true }
httpmock = { workspace = true }
reqwest = { workspace = true, features = ["json", "stream"] }
schemars = { workspace = true }
serde = { workspace = true, features = ["derive"] }
# float_roundtrip keeps cassette scrubbing idempotent on float-heavy bodies
# (e.g. embedding vectors): without it, parse→print can oscillate between two
# representations of the same decimal and the recorded YAML never stabilizes.
# Golden logs preserve JSON object insertion order. Declare that requirement
# directly instead of inheriting it from a database driver's feature graph.
serde_json = { workspace = true, features = ["float_roundtrip", "preserve_order"] }
serde_yaml = { workspace = true }
syn = { workspace = true, features = ["full", "visit"] }
tracing = { workspace = true }
[features]
typesafeai = ["dep:rig-typesafeai"]
default = ["rig-core/default", "reqwest", "agent", "derive", "rustls", "cli"]
# The `rig` binary, the launcher of the rig coding agent (rig-cli). On wasm it
# adds nothing.
cli = ["dep:rig-cli"]
agent = ["dep:rig-agent", "rig-cassette?/agent"]
# `rig::cassette`: effect-log recording and replay. With `agent`, also the
# classic-agent adapter (`rig::cassette::agent`).
cassette = ["dep:rig-cassette"]
test-utils = ["rig-core/test-utils", "rig-agent?/test-utils"]
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"]
# With `sqlite` or `postgres`, also their rig-memory session stores.
memory = ["dep:rig-memory", "rig-postgres?/memory", "rig-sqlite?/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"]
derive = ["dep:rig-derive", "rig-core/derive", "rig-agent?/derive"]
pdf = ["rig-core/pdf"]
epub = ["rig-core/epub"]
rmcp = ["dep:rig-rmcp"]
socks = ["reqwest", "rig-reqwest/socks"]
# Provider clients built with no transport named (`OpenAI::from_env()`) send
# through the bundled reqwest client: rig-core's `reqwest` feature.
reqwest = ["dep:rig-reqwest", "rig-core/reqwest", "rig-typesafeai?/reqwest"]
# The bundled websocket backend (`rig-tungstenite`) and the provider websocket
# sessions it drives, through rig-core's `tungstenite` feature. Independent of
# the HTTP transport axis: a session borrows the provider client for its
# request mapping, so `reqwest` comes along for the client, not for the socket.
#
# `websocket` is the API gate — it is what `pub use rig_tungstenite` is cfg'd
# on — and each of the three spellings is usable on its own. `rig-tungstenite`'s own `default = ["rustls"]` applies (see its
# dependency line), so `websocket` always has a working TLS stack; the
# `websocket-*-tls` spellings add the workspace-wide TLS feature on top, which
# is also what wires the backend up for `native-tls`.
#
# Additive features cannot express "replace rustls with native-tls": a
# native-tls-ONLY socket means depending on `rig-tungstenite` directly with
# `default-features = false, features = ["native-tls"]`. Through the facade,
# `websocket-native-tls` gets you a working native-tls socket with rustls also
# compiled in. That trade is deliberate — a build that silently cannot speak
# `wss://` is worse than one that compiles a TLS stack it does not use.
websocket = ["reqwest", "dep:rig-tungstenite", "rig-core/tungstenite"]
websocket-rustls = ["websocket", "rustls"]
websocket-native-tls = ["websocket", "native-tls"]
rustls = [
"rig-core/rustls",
"rig-reqwest?/rustls",
"rig-tungstenite?/rustls",
"rig-fastembed?/hf-hub-rustls-tls",
"rig-helixdb?/rustls",
"rig-lancedb?/rig-rustls",
"rig-milvus?/rustls",
"rig-vectorize?/rustls",
]
native-tls = [
"rig-core/native-tls",
"rig-reqwest?/native-tls",
"rig-tungstenite?/native-tls",
"rig-fastembed?/hf-hub-native-tls",
"rig-helixdb?/native-tls",
"rig-lancedb?/rig-native-tls",
"rig-milvus?/native-tls",
"rig-vectorize?/native-tls",
]
reqwest-middleware = ["reqwest", "rig-reqwest/reqwest-middleware"]
reqwest-middleware-rustls = ["reqwest", "rig-reqwest/reqwest-middleware-rustls"]
reqwest-middleware-native-tls = ["reqwest", "rig-reqwest/reqwest-middleware-native-tls"]