grafeo-engine 0.5.21

Query engine and database management for Grafeo
Documentation
[package]
name = "grafeo-engine"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
description = "Query engine and database management for Grafeo"

[dependencies]
grafeo-common.workspace = true
grafeo-core = { workspace = true, default-features = false }
grafeo-adapters = { workspace = true, default-features = false }

# Error handling
thiserror.workspace = true
anyhow.workspace = true

# Data structures
arcstr.workspace = true
smallvec.workspace = true
hashbrown.workspace = true
indexmap.workspace = true

# Concurrency
parking_lot.workspace = true
crossbeam = { workspace = true, optional = true }
rayon = { workspace = true, optional = true }

# Serialization
serde.workspace = true
bincode.workspace = true

# Regex for SPARQL FILTER (use regex-lite for smaller WASM builds)
regex = { workspace = true, optional = true }
regex-lite = { workspace = true, optional = true }

# Cryptographic hashes for SPARQL hash functions (optional, RDF only)
md5 = { workspace = true, optional = true }
sha1 = { workspace = true, optional = true }
sha2 = { workspace = true, optional = true }

# Tracing
tracing.workspace = true

# Embedding (optional, for ONNX embedding generation)
ort = { version = "2.0.0-rc.12", optional = true, default-features = false, features = ["std", "ndarray", "load-dynamic", "api-24"] }
tokenizers = { version = "0.22", optional = true, default-features = false, features = ["onig"] }
hf-hub = { version = "0.5", optional = true }

[dev-dependencies]
criterion.workspace = true
tempfile.workspace = true
serde_json = "1"
tokio.workspace = true

[features]
default = ["gql", "parallel", "wal", "spill", "mmap", "regex"]
regex = ["dep:regex", "grafeo-core/regex"]
regex-lite = ["dep:regex-lite", "grafeo-core/regex-lite"]
gql = ["grafeo-adapters/gql"]
cypher = ["grafeo-adapters/cypher"]
sparql = ["grafeo-adapters/sparql"]
gremlin = ["grafeo-adapters/gremlin"]
graphql = ["grafeo-adapters/graphql"]
sql-pgq = ["grafeo-adapters/sql-pgq"]  # SQL/PGQ (SQL:2023 GRAPH_TABLE)
rdf = ["grafeo-core/rdf", "grafeo-adapters/rdf", "md5", "sha1", "sha2"]  # RDF graph model and planner
parallel = ["rayon", "crossbeam", "grafeo-core/parallel", "grafeo-adapters/parallel"]  # Parallel execution
algos = ["grafeo-adapters/algos"]  # Graph algorithm plugin (SSSP, PageRank, etc.)
wal = ["grafeo-adapters/wal"]  # Write-ahead log storage
grafeo-file = ["grafeo-adapters/grafeo-file"]  # Single-file .grafeo format
spill = ["grafeo-core/spill"]  # Disk spilling for out-of-core execution
mmap = ["grafeo-core/mmap"]  # File-backed vector storage
# Convenience groups
languages = ["gql", "cypher", "sparql", "gremlin", "graphql", "sql-pgq"]  # All query language parsers
ai = ["vector-index", "text-index", "hybrid-search", "cdc"]  # All AI/RAG features
storage = ["wal", "grafeo-file", "spill", "mmap"]  # Persistent storage (WAL, single-file, disk spill, mmap)

# Named profiles (ecosystem-aligned)
embedded = ["gql", "ai", "algos", "parallel", "regex", "jsonl-import"]  # Python libs, MCP, in-process
browser = ["gql", "regex-lite"]  # WASM / grafeo-web
server = ["full"]  # grafeo-server
full = ["languages", "ai", "rdf", "parallel", "algos", "storage", "jsonl-import", "parquet-import"]

# Data import
jsonl-import = ["grafeo-core/jsonl-import"]  # JSON Lines file import
parquet-import = ["grafeo-core/parquet-import"]  # Apache Parquet file import

# Search & AI features
vector-index = ["grafeo-core/vector-index"]  # HNSW vector index for k-NN search
text-index = ["grafeo-core/text-index"]  # BM25 inverted index for full-text search
hybrid-search = ["grafeo-core/hybrid-search", "text-index", "vector-index"]  # Combined text + vector search
cdc = []  # Change data capture with history API
embed = ["ort", "tokenizers", "hf-hub"]  # ONNX embedding generation (opt-in, adds ~17MB)

# Testing utilities (zero overhead when disabled)
testing-crash-injection = ["grafeo-core/testing-crash-injection"]  # Crash injection for recovery testing

[lints]
workspace = true

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