datacules-agentdb 0.7.0

Single-file embedded database for AI agents. SQL + Vector Search + Full-Text Search + Hybrid Queries + Memory Graphs.
Documentation
# MSRV: 1.95.0 — libsqlite3-sys 0.38+ (via rusqlite 0.40) requires cfg_select! (stable 1.95).
[package]
name = "datacules-agentdb"
version = "0.7.0"
edition = "2021"
rust-version = "1.95"
authors = ["Datacules LLC <hello@datacules.com>"]
description = "Single-file embedded database for AI agents. SQL + Vector Search + Full-Text Search + Hybrid Queries + Memory Graphs."
license = "Unlicense"
repository = "https://github.com/hvrcharon1/agentdb"
homepage = "https://github.com/hvrcharon1/agentdb"
documentation = "https://docs.rs/datacules-agentdb"
readme = "README.md"
keywords = ["database", "vector-search", "ai", "agents", "embedded"]
categories = ["database", "embedded", "science", "data-structures"]
exclude = ["python/", "nodejs/", "target/", ".github/"]

# ── Library ────────────────────────────────────────────────────────────
[lib]
name = "agentdb"
# cdylib is only needed when building the C FFI or Python/Node bindings.
# Keep it out of the default rlib so `cargo add datacules-agentdb` users never need
# a C linker on Windows/macOS.
crate-type = ["rlib"]

# ── CLI binary ─────────────────────────────────────────────────────────
[[bin]]
name = "agentdb"
path = "src/bin/agentdb.rs"
required-features = ["cli"]

# ── Examples ───────────────────────────────────────────────────────────
[[example]]
name = "agent_memory"
path = "examples/agent_memory.rs"

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

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

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

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

# ── Benchmarks ─────────────────────────────────────────────────────────
[[bench]]
name = "vector_search"
harness = false

[[bench]]
name = "graph_traverse"
harness = false

# ── Dependencies ───────────────────────────────────────────────────────
[dependencies]
rusqlite  = { version = "0.40", features = ["bundled"] }
serde     = { version = "1",    features = ["derive"] }
serde_json = "1"
bincode   = { version = "2", features = ["serde"] }
thiserror = "2"
uuid      = { version = "~1.20", features = ["v4"] }
rand      = "0.10"
regex     = { version = "1", default-features = false, features = ["std"] }

# Optional: async runtime
tokio = { version = "1", features = ["full"], optional = true }

# Optional: Python bindings (PyO3)
pyo3 = { version = "0.29", features = ["extension-module"], optional = true }

# Optional: WASM target
wasm-bindgen = { version = "0.2", optional = true }
libsqlite3-sys = { version = "0.38", features = ["bundled"], optional = true }
web-sys = { version = "0.3", features = [
    "Window",
    "Navigator",
    "StorageManager",
    "FileSystemDirectoryHandle",
    "FileSystemFileHandle",
    "FileSystemSyncAccessHandle",
    "FileSystemGetFileOptions",
    "FileSystemCreateWritableOptions",
    "FileSystemWritableFileStream",
    "File",
    "Blob",
], optional = true }
js-sys = { version = "0.3", optional = true }
wasm-bindgen-futures = { version = "0.4", optional = true }

# CLI argument parsing (only needed by the [[bin]] target)
clap = { version = "4", features = ["derive"], optional = true }

# Shell completion generation (only needed by the [[bin]] target)
clap_complete = { version = "4", optional = true }

[dev-dependencies]
criterion = { version = "0.8" }
tempfile  = "3"
tokio     = { version = "1", features = ["full"] }

# ── Features ───────────────────────────────────────────────────────────
[features]
default = ["cli"]

# CLI binary support (clap argument parsing + shell completions).
cli = ["clap", "clap_complete"]

# Async runtime support
async = ["tokio"]

# C FFI + Python/Node shared-library build.
# Enables cdylib output — requires a C linker and the matching toolchain.
ffi = []

# Python bindings via PyO3 + maturin.
python = ["pyo3", "ffi"]

# WASM build via wasm-pack.
wasm = ["wasm-bindgen", "web-sys", "js-sys", "wasm-bindgen-futures", "libsqlite3-sys"]

# ── Build profiles ─────────────────────────────────────────────────────
[profile.release]
opt-level     = 3
lto           = true
codegen-units = 1
strip         = true

[profile.release-dbg]
inherits  = "release"
strip     = false
debug     = 1