rag 0.1.4

A Rust library and CLI for Retrieval-Augmented Generation
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"
name = "rag"
version = "0.1.4"
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",
]
default = [
    "http",
    "hnsw",
    "ingest",
    "pdf",
    "mcp",
    "cli",
]
hnsw = ["dep:hnsw_rs"]
http = ["dep:reqwest"]
ingest = ["dep:walkdir"]
llm-extractor = ["http"]
mcp = [
    "dep:rmcp",
    "dep:schemars",
    "dep:tracing-subscriber",
    "http",
]
ollama = ["http"]
openai = ["http"]
pdf = ["dep:lopdf"]

[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_vector_store"
path = "examples/advanced_vector_store.rs"

[[example]]
name = "batch_search"
path = "examples/batch_search.rs"

[[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 = "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 = "mcp_example"
path = "examples/mcp_example.rs"
required-features = ["mcp"]

[[example]]
name = "minimal_vector_db"
path = "examples/minimal_vector_db.rs"

[[example]]
name = "pure_memory_rag"
path = "examples/pure_memory_rag.rs"

[[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 = "simple_rag"
path = "examples/simple_rag.rs"
required-features = ["http"]

[[example]]
name = "sparse_vector_search"
path = "examples/sparse_vector_search.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 = "vector_store_test"
path = "tests/vector_store_test.rs"

[dependencies.async-trait]
version = "0.1"

[dependencies.clap]
version = "4.4"
features = [
    "derive",
    "env",
]
optional = true

[dependencies.dashmap]
version = "5.5"

[dependencies.hnsw_rs]
version = "0.3"
optional = true

[dependencies.lopdf]
version = "0.32"
optional = true

[dependencies.reqwest]
version = "0.11"
features = ["json"]
optional = true

[dependencies.rmcp]
version = "1.6"
features = [
    "server",
    "macros",
    "transport-io",
    "schemars",
]
optional = true

[dependencies.schemars]
version = "1.0"
optional = true

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

[dependencies.serde_json]
version = "1.0"

[dependencies.thiserror]
version = "1.0"

[dependencies.tokio]
version = "1.35"
features = [
    "rt-multi-thread",
    "macros",
    "fs",
]

[dependencies.tracing]
version = "0.1"

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

[dependencies.urlencoding]
version = "2.1"

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

[dependencies.walkdir]
version = "2.5"
optional = true

[dev-dependencies.tempfile]
version = "3.8"