-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
89 lines (83 loc) · 4.46 KB
/
Copy pathCargo.toml
File metadata and controls
89 lines (83 loc) · 4.46 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
[package]
name = "docling-rag"
description = "Pluggable RAG subsystem for docling.rs: chunking, embeddings, vector store, and semantic search."
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
readme = "README.md"
keywords = ["rag", "embeddings", "semantic-search", "vector", "docling"]
categories = ["text-processing", "database"]
rust-version.workspace = true
[[bin]]
name = "docling-rag"
path = "src/bin/docling-rag.rs"
[features]
# The default build is fully offline-testable: bundled SQLite + HTTP embedders.
default = ["sqlite", "ollama"]
sqlite = ["sqlx/sqlite", "dep:sqlite-vec", "dep:libsqlite3-sys"]
postgres = ["sqlx/postgres"]
# HTTP-only backends ride on reqwest (no native deps) and always compile; the
# feature flags below just gate the small amount of provider-specific code.
ollama = []
gemini = []
openrouter = []
# Heavy / native-dependency backends. Real code, but not exercised in offline CI.
onnx-embed = ["dep:ort", "dep:tokenizers"]
# GPU execution providers (#108 follow-up): document conversion during ingest
# runs on the selected provider (docling/<ep>), and — when onnx-embed is also
# on — so does the local embedder (its session routes through docling-pdf's
# ep module, the same DOCLING_RS_EP switch as the rest of the stack; `ort?/`
# is a weak feature, so a GPU feature alone doesn't drag ort in).
cuda = ["docling/cuda", "docling-pdf/cuda", "ort?/cuda", "ort?/copy-dylibs"]
tensorrt = ["docling/tensorrt", "docling-pdf/tensorrt", "ort?/tensorrt", "ort?/copy-dylibs"]
directml = ["docling/directml", "docling-pdf/directml", "ort?/directml", "ort?/copy-dylibs"]
coreml = ["docling/coreml", "docling-pdf/coreml", "ort?/coreml", "ort?/copy-dylibs"]
remote-sources = ["dep:suppaftp", "dep:ssh2"]
rabbitmq = ["dep:lapin", "dep:futures-lite"]
redis = ["dep:redis", "dep:futures-lite"]
[dependencies]
# `>=` requirements on purpose while this crate rides an open PR: release.sh
# bumps every sibling's exact pin on master with each release, which would
# break this branch's merge-ref build. Post-merge, release.sh rewrites these
# to exact pins automatically (its sed matches any quoted version here).
# `chunking` enables the HF-tokenizer-backed HybridChunker (RAG_CHUNKER=hybrid).
docling = { path = "../docling", version = "0.52.0", features = ["chunking"] }
# Direct dep only for pdfium_backend::page_count (PDF page metrics); already in
# the graph via docling.rs, so this adds no compile cost.
docling-pdf = { path = "../docling-pdf", version = "0.52.0" }
# Counting slides/sheets in OOXML containers for page metrics (names only).
zip = { version = "2.2", default-features = false, features = ["deflate"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "fs", "time", "signal"] }
axum = "0.8"
async-trait = "0.1"
thiserror = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
dotenvy = "0.15"
clap = { version = "4", features = ["derive", "env"] }
# rustls-tls so the crypto/TLS stack matches what the workspace already builds via
# `ort` (tls-rustls) and sqlx below — no OpenSSL system dependency.
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "tls-rustls"] }
# sqlite-vec: the `vec0` ANN virtual table, statically compiled into the bundled
# SQLite. libsqlite3-sys must match sqlx's (cargo enforces one copy via `links`);
# we need it directly for sqlite3_auto_extension to register the extension.
sqlite-vec = { version = "0.1.6", optional = true }
libsqlite3-sys = { version = "0.30", optional = true }
pulldown-cmark = { version = "0.13", default-features = false }
uuid = { version = "1", features = ["v4"] }
sha2 = "0.10"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# --- feature-gated / optional backends ---
ort = { version = "2.0.0-rc.12", default-features = false, features = ["std", "download-binaries", "tls-rustls"], optional = true }
tokenizers = { version = "0.20", default-features = false, features = ["onig"], optional = true }
suppaftp = { version = "6", optional = true }
ssh2 = { version = "0.9", optional = true }
lapin = { version = "2", optional = true }
futures-lite = { version = "2", optional = true }
redis = { version = "0.27", default-features = false, features = ["tokio-comp"], optional = true }
[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros", "test-util"] }