1#![allow(missing_docs)]
29#![allow(clippy::all)]
30#![allow(clippy::incompatible_msrv)]
31
32pub mod advanced_features;
33
34#[cfg(feature = "storage")]
36pub mod agenticdb;
37
38pub mod distance;
39pub mod embeddings;
40pub mod error;
41pub mod index;
42pub mod quantization;
43
44#[cfg(feature = "storage")]
46pub mod storage;
47
48#[cfg(not(feature = "storage"))]
49pub mod storage_memory;
50
51#[cfg(not(feature = "storage"))]
52pub use storage_memory as storage;
53
54pub mod types;
55pub mod vector_db;
56
57pub mod arena;
59pub mod cache_optimized;
60#[cfg(all(feature = "parallel", not(target_arch = "wasm32")))]
61pub mod lockfree;
62pub mod simd_intrinsics;
63
64pub mod memory;
72
73pub mod advanced;
75
76pub mod integration;
81
82pub use advanced_features::{
84 fuse_rankings, ConformalConfig, ConformalPredictor, EnhancedPQ, FilterExpression,
85 FilterStrategy, FilteredSearch, FusionConfig, FusionStrategy, HybridConfig, HybridSearch,
86 MMRConfig, MMRSearch, PQConfig, PredictionSet, ScoredDoc, SparseIndex, SparseVector, BM25,
87};
88
89#[cfg(feature = "storage")]
90pub use agenticdb::{
91 AgenticDB, PolicyAction, PolicyEntry, PolicyMemoryStore, SessionStateIndex, SessionTurn,
92 WitnessEntry, WitnessLog,
93};
94
95#[cfg(feature = "api-embeddings")]
96pub use embeddings::ApiEmbedding;
97pub use embeddings::{BoxedEmbeddingProvider, EmbeddingProvider, HashEmbedding};
98
99#[cfg(feature = "real-embeddings")]
100pub use embeddings::CandleEmbedding;
101
102#[cfg(feature = "onnx-embeddings")]
103pub use embeddings::OnnxEmbedding;
104
105#[cfg(feature = "lattice-embeddings")]
106pub use embeddings::LatticeEmbedding;
107
108#[cfg(feature = "storage")]
110#[allow(deprecated, clippy::let_unit_value)]
111const _: () = {
112 #[deprecated(
113 since = "0.1.0",
114 note = "AgenticDB uses placeholder hash-based embeddings. For semantic search, use OnnxEmbedding (feature: onnx-embeddings) or ApiEmbedding. See ADR-114 for details."
115 )]
116 const AGENTICDB_EMBEDDING_WARNING: () = ();
117 let _ = AGENTICDB_EMBEDDING_WARNING;
118};
119
120pub use error::{Result, RuvectorError};
121pub use types::{DistanceMetric, SearchQuery, SearchResult, VectorEntry, VectorId};
122pub use vector_db::VectorDB;
123
124pub use quantization::{
126 BinaryQuantized, Int4Quantized, ProductQuantized, QuantizedVector, ScalarQuantized,
127};
128
129pub use arena::{Arena, ArenaVec, BatchVectorAllocator, CacheAlignedVec, CACHE_LINE_SIZE};
131
132#[cfg(all(feature = "parallel", not(target_arch = "wasm32")))]
134pub use lockfree::{
135 AtomicVectorPool, BatchItem, BatchResult, LockFreeBatchProcessor, LockFreeCounter,
136 LockFreeStats, LockFreeWorkQueue, ObjectPool, PooledObject, PooledVector, StatsSnapshot,
137 VectorPoolStats,
138};
139
140pub use cache_optimized::SoAVectorStorage;
142
143#[cfg(test)]
144mod tests {
145 use super::*;
146
147 #[test]
148 fn test_version() {
149 let version = env!("CARGO_PKG_VERSION");
151 assert!(!version.is_empty(), "Version should not be empty");
152 assert!(
154 version.starts_with("2.") || version.starts_with("0.1."),
155 "Version should be 2.x or 0.1.x, got: {}",
156 version
157 );
158 }
159}