|
| 1 | +[package] |
| 2 | +name = "fleischwolf-rag" |
| 3 | +description = "Pluggable RAG subsystem for Fleischwolf: chunking, embeddings, vector store, and semantic search." |
| 4 | +version.workspace = true |
| 5 | +edition.workspace = true |
| 6 | +license.workspace = true |
| 7 | +repository.workspace = true |
| 8 | +homepage.workspace = true |
| 9 | +readme = "README.md" |
| 10 | +keywords = ["rag", "embeddings", "semantic-search", "vector", "docling"] |
| 11 | +categories = ["text-processing", "database"] |
| 12 | +# MSRV is raised over the workspace default by tokio/sqlx/reqwest; kept in step |
| 13 | +# with fleischwolf-pdf (ort) which already needs a recent toolchain. |
| 14 | +rust-version = "1.82" |
| 15 | + |
| 16 | +[[bin]] |
| 17 | +name = "fleischwolf-rag" |
| 18 | +path = "src/bin/fleischwolf-rag.rs" |
| 19 | + |
| 20 | +[features] |
| 21 | +# The default build is fully offline-testable: bundled SQLite + HTTP embedders. |
| 22 | +default = ["sqlite", "ollama"] |
| 23 | +sqlite = ["sqlx/sqlite", "dep:sqlite-vec", "dep:libsqlite3-sys"] |
| 24 | +postgres = ["sqlx/postgres"] |
| 25 | +# HTTP-only backends ride on reqwest (no native deps) and always compile; the |
| 26 | +# feature flags below just gate the small amount of provider-specific code. |
| 27 | +ollama = [] |
| 28 | +gemini = [] |
| 29 | +openrouter = [] |
| 30 | +# Heavy / native-dependency backends. Real code, but not exercised in offline CI. |
| 31 | +onnx-embed = ["dep:ort", "dep:tokenizers"] |
| 32 | +remote-sources = ["dep:suppaftp", "dep:ssh2"] |
| 33 | +rabbitmq = ["dep:lapin", "dep:futures-lite"] |
| 34 | +redis = ["dep:redis", "dep:futures-lite"] |
| 35 | + |
| 36 | +[dependencies] |
| 37 | +# `>=` requirements on purpose while this crate rides an open PR: release.sh |
| 38 | +# bumps every sibling's exact pin on master with each release, which would |
| 39 | +# break this branch's merge-ref build. Post-merge, release.sh rewrites these |
| 40 | +# to exact pins automatically (its sed matches any quoted version here). |
| 41 | +fleischwolf = { path = "../fleischwolf", version = ">=0.12" } |
| 42 | +# Direct dep only for pdfium_backend::page_count (PDF page metrics); already in |
| 43 | +# the graph via fleischwolf, so this adds no compile cost. |
| 44 | +fleischwolf-pdf = { path = "../fleischwolf-pdf", version = ">=0.12" } |
| 45 | +# Counting slides/sheets in OOXML containers for page metrics (names only). |
| 46 | +zip = { version = "2.2", default-features = false, features = ["deflate"] } |
| 47 | + |
| 48 | +tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "fs", "time", "signal"] } |
| 49 | +axum = "0.8" |
| 50 | +async-trait = "0.1" |
| 51 | +thiserror = "2" |
| 52 | +serde = { version = "1", features = ["derive"] } |
| 53 | +serde_json = "1" |
| 54 | +dotenvy = "0.15" |
| 55 | +clap = { version = "4", features = ["derive", "env"] } |
| 56 | +# rustls-tls so the crypto/TLS stack matches what the workspace already builds via |
| 57 | +# `ort` (tls-rustls) and sqlx below — no OpenSSL system dependency. |
| 58 | +reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] } |
| 59 | +sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "tls-rustls"] } |
| 60 | +# sqlite-vec: the `vec0` ANN virtual table, statically compiled into the bundled |
| 61 | +# SQLite. libsqlite3-sys must match sqlx's (cargo enforces one copy via `links`); |
| 62 | +# we need it directly for sqlite3_auto_extension to register the extension. |
| 63 | +sqlite-vec = { version = "0.1.6", optional = true } |
| 64 | +libsqlite3-sys = { version = "0.30", optional = true } |
| 65 | +pulldown-cmark = { version = "0.13", default-features = false } |
| 66 | +uuid = { version = "1", features = ["v4"] } |
| 67 | +sha2 = "0.10" |
| 68 | +tracing = "0.1" |
| 69 | +tracing-subscriber = { version = "0.3", features = ["env-filter"] } |
| 70 | + |
| 71 | +# --- feature-gated / optional backends --- |
| 72 | +ort = { version = "2.0.0-rc.12", default-features = false, features = ["std", "download-binaries", "tls-rustls"], optional = true } |
| 73 | +tokenizers = { version = "0.20", default-features = false, features = ["onig"], optional = true } |
| 74 | +suppaftp = { version = "6", optional = true } |
| 75 | +ssh2 = { version = "0.9", optional = true } |
| 76 | +lapin = { version = "2", optional = true } |
| 77 | +futures-lite = { version = "2", optional = true } |
| 78 | +redis = { version = "0.27", default-features = false, features = ["tokio-comp"], optional = true } |
| 79 | + |
| 80 | +[dev-dependencies] |
| 81 | +tokio = { version = "1", features = ["rt-multi-thread", "macros", "test-util"] } |
0 commit comments