[package]
edition = "2024"
name = "rag"
version = "0.1.5"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A Rust library and CLI for Retrieval-Augmented Generation"
homepage = "https://github.com/yingkitw/rag"
documentation = "https://docs.rs/rag"
readme = "README.md"
keywords = [
"rag",
"retrieval",
"vector-search",
"mcp",
"llm",
]
categories = [
"text-processing",
"data-structures",
"algorithms",
]
license = "Apache-2.0"
repository = "https://github.com/yingkitw/rag"
[features]
cli = [
"dep:clap",
"dep:tracing-subscriber",
"http",
]
compress = ["dep:zstd"]
default = [
"http",
"hnsw",
"ingest",
"pdf",
"mcp",
"cli",
]
fastembed = ["dep:fastembed"]
hnsw = ["dep:hnsw_rs"]
http = ["dep:reqwest"]
image-embeddings = ["fastembed"]
ingest = []
llm-extractor = ["http"]
mcp = [
"dep:rmcp",
"dep:schemars",
"dep:tracing-subscriber",
"dep:tracing",
"http",
]
ollama = ["http"]
openai = ["http"]
pdf = ["dep:lopdf"]
postgres = [
"dep:tokio-postgres",
"dep:pgvector",
]
qdrant = ["dep:reqwest"]
sqlite = ["dep:rusqlite"]
[lib]
name = "rag"
path = "src/lib.rs"
[[bin]]
name = "rag"
path = "src/main.rs"
required-features = ["cli"]
[[bin]]
name = "rag-mcp"
path = "src/mcp_server.rs"
required-features = ["mcp"]
[[example]]
name = "advanced_chunking"
path = "examples/advanced_chunking.rs"
[[example]]
name = "advanced_vector_store"
path = "examples/advanced_vector_store.rs"
[[example]]
name = "batch_search"
path = "examples/batch_search.rs"
[[example]]
name = "compressed_persistence"
path = "examples/compressed_persistence.rs"
required-features = ["compress"]
[[example]]
name = "configurable_bm25"
path = "examples/configurable_bm25.rs"
[[example]]
name = "contextual_retrieval"
path = "examples/contextual_retrieval.rs"
required-features = ["http"]
[[example]]
name = "distance_metrics"
path = "examples/distance_metrics.rs"
[[example]]
name = "diversification_aggregation"
path = "examples/diversification_aggregation.rs"
[[example]]
name = "evaluation_metrics"
path = "examples/evaluation_metrics.rs"
[[example]]
name = "graph_rag_example"
path = "examples/graph_rag_example.rs"
required-features = ["http"]
[[example]]
name = "graph_store_basic"
path = "examples/graph_store_basic.rs"
[[example]]
name = "ingest_codebase"
path = "examples/ingest_codebase.rs"
required-features = ["ingest"]
[[example]]
name = "ingest_fixture_rag"
path = "examples/ingest_fixture_rag.rs"
[[example]]
name = "ingest_pdf"
path = "examples/ingest_pdf.rs"
required-features = ["pdf"]
[[example]]
name = "ingest_wiki"
path = "examples/ingest_wiki.rs"
required-features = ["http"]
[[example]]
name = "local_embeddings"
path = "examples/local_embeddings.rs"
required-features = ["fastembed"]
[[example]]
name = "mcp_example"
path = "examples/mcp_example.rs"
required-features = ["mcp"]
[[example]]
name = "minimal_vector_db"
path = "examples/minimal_vector_db.rs"
[[example]]
name = "postgres_vector_store"
path = "examples/postgres_vector_store.rs"
required-features = ["postgres"]
[[example]]
name = "pure_memory_rag"
path = "examples/pure_memory_rag.rs"
[[example]]
name = "qdrant_vector_store"
path = "examples/qdrant_vector_store.rs"
required-features = ["qdrant"]
[[example]]
name = "query_rewriting"
path = "examples/query_rewriting.rs"
required-features = ["http"]
[[example]]
name = "rrf_hybrid_search"
path = "examples/rrf_hybrid_search.rs"
[[example]]
name = "simd_distances"
path = "examples/simd_distances.rs"
[[example]]
name = "simple_rag"
path = "examples/simple_rag.rs"
required-features = ["http"]
[[example]]
name = "sparse_vector_search"
path = "examples/sparse_vector_search.rs"
[[example]]
name = "sqlite_vector_store"
path = "examples/sqlite_vector_store.rs"
required-features = ["sqlite"]
[[example]]
name = "vector_quantization"
path = "examples/vector_quantization.rs"
[[example]]
name = "write_ahead_log"
path = "examples/write_ahead_log.rs"
[[test]]
name = "advanced_features_test"
path = "tests/advanced_features_test.rs"
[[test]]
name = "bm25_caching_test"
path = "tests/bm25_caching_test.rs"
[[test]]
name = "example_behavior_test"
path = "tests/example_behavior_test.rs"
[[test]]
name = "filter_first_search_test"
path = "tests/filter_first_search_test.rs"
[[test]]
name = "graph_rag_engine_test"
path = "tests/graph_rag_engine_test.rs"
[[test]]
name = "integration_test"
path = "tests/integration_test.rs"
[[test]]
name = "new_features_test"
path = "tests/new_features_test.rs"
[[test]]
name = "postgres_vector_store_test"
path = "tests/postgres_vector_store_test.rs"
[[test]]
name = "sqlite_vector_store_test"
path = "tests/sqlite_vector_store_test.rs"
[[test]]
name = "vector_store_test"
path = "tests/vector_store_test.rs"
[dependencies.clap]
version = "4.4"
features = [
"derive",
"env",
]
optional = true
[dependencies.fastembed]
version = "4"
optional = true
[dependencies.hnsw_rs]
version = "0.3"
optional = true
[dependencies.lopdf]
version = "0.32"
optional = true
[dependencies.pgvector]
version = "0.3"
features = ["postgres"]
optional = true
[dependencies.reqwest]
version = "0.11"
features = [
"json",
"rustls-tls",
]
optional = true
default-features = false
[dependencies.rmcp]
version = "1.6"
features = [
"server",
"macros",
"transport-io",
"schemars",
]
optional = true
[dependencies.rusqlite]
version = "0.32"
features = ["bundled"]
optional = true
[dependencies.schemars]
version = "1.0"
optional = true
[dependencies.serde]
version = "1.0"
features = ["derive"]
[dependencies.serde_json]
version = "1.0"
[dependencies.tokio]
version = "1.35"
features = [
"rt-multi-thread",
"macros",
"fs",
]
[dependencies.tokio-postgres]
version = "0.7"
features = ["runtime"]
optional = true
[dependencies.tracing]
version = "0.1"
optional = true
[dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]
optional = true
[dependencies.zstd]
version = "0.13"
optional = true
[dev-dependencies.tempfile]
version = "3.8"
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true