Skip to main content

vantadb/
lib.rs

1#![doc(html_root_url = "https://docs.rs/vantadb/0.1.4/vantadb/")]
2
3//! # VantaDB — Embedded Persistent Memory Engine
4//!
5//! Embedded core for durable local memory, vector retrieval,
6//! and structured fields.
7
8pub(crate) mod backend;
9pub(crate) mod backends;
10pub mod binary_header;
11#[cfg(feature = "cli")]
12pub mod cli;
13#[cfg(feature = "cli")]
14pub mod cli_handlers;
15#[cfg(feature = "server")]
16pub mod cli_server;
17#[cfg(feature = "arrow")]
18pub mod columnar;
19pub mod config;
20#[cfg(feature = "cli")]
21pub mod console;
22pub mod engine;
23pub mod error;
24pub mod executor;
25pub mod gc;
26pub mod governor;
27pub mod graph;
28pub mod hardware;
29pub mod index;
30pub mod integrations;
31#[cfg(feature = "remote-inference")]
32pub mod llm;
33pub mod metadata;
34pub mod metrics;
35pub mod node;
36pub mod parser;
37pub mod serialization;
38pub mod physical_plan;
39pub mod planner;
40#[cfg(feature = "python_sdk")]
41pub mod python;
42pub mod query;
43pub mod sdk;
44
45pub mod storage;
46pub(crate) mod text_index;
47#[cfg(feature = "advanced-tokenizer")]
48pub mod tokenizer;
49pub mod utils;
50pub mod vector;
51pub mod wal;
52
53// Re-exports for ergonomic API
54pub use binary_header::VantaHeader;
55pub use engine::{EngineStats, InMemoryEngine, QueryResult, SourceType};
56pub use error::{Result, VantaError};
57pub use node::{
58    DistanceMetric, Edge, FieldValue, NodeFlags, RelFields, UnifiedNode, VectorRepresentations,
59};
60pub use sdk::{
61    VantaBm25TermContribution, VantaCapabilities, VantaEdgeRecord, VantaEmbedded,
62    VantaExportReport, VantaFields, VantaHybridFusionReport, VantaImportReport,
63    VantaIndexRebuildReport, VantaMemoryInput, VantaMemoryListOptions, VantaMemoryListPage,
64    VantaMemoryMetadata, VantaMemoryRecord, VantaMemorySearchHit, VantaMemorySearchRequest,
65    VantaNodeInput, VantaNodeRecord, VantaOperationalMetrics, VantaQueryResult,
66    VantaRuntimeProfile, VantaSearchExplanation, VantaSearchExplanationHit, VantaSearchHit,
67    VantaStorageTier, VantaTextIndexAuditReport, VantaTextIndexRepairReport, VantaValue,
68};
69pub use storage::BackendKind;
70pub use utils::{compute_confidence_friction, DuplicatePreventionFilter, OriginCollisionTracker};
71pub use wal::{WalReader, WalRecord, WalWriter};
72
73#[cfg(feature = "failpoints")]
74pub use fail::FailScenario;
75
76#[cfg(feature = "failpoints")]
77pub fn cfg_failpoint(name: &str, actions: &str) -> std::result::Result<(), String> {
78    fail::cfg(name, actions).map_err(|e| format!("{:?}", e))
79}
80
81#[cfg(feature = "failpoints")]
82pub fn remove_failpoint(name: &str) {
83    fail::remove(name);
84}