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 = "storage")]
107#[allow(deprecated, clippy::let_unit_value)]
108const _: () = {
109 #[deprecated(
110 since = "0.1.0",
111 note = "AgenticDB uses placeholder hash-based embeddings. For semantic search, use OnnxEmbedding (feature: onnx-embeddings) or ApiEmbedding. See ADR-114 for details."
112 )]
113 const AGENTICDB_EMBEDDING_WARNING: () = ();
114 let _ = AGENTICDB_EMBEDDING_WARNING;
115};
116
117pub use error::{Result, RuvectorError};
118pub use types::{DistanceMetric, SearchQuery, SearchResult, VectorEntry, VectorId};
119pub use vector_db::VectorDB;
120
121pub use quantization::{
123 BinaryQuantized, Int4Quantized, ProductQuantized, QuantizedVector, ScalarQuantized,
124};
125
126pub use arena::{Arena, ArenaVec, BatchVectorAllocator, CacheAlignedVec, CACHE_LINE_SIZE};
128
129#[cfg(all(feature = "parallel", not(target_arch = "wasm32")))]
131pub use lockfree::{
132 AtomicVectorPool, BatchItem, BatchResult, LockFreeBatchProcessor, LockFreeCounter,
133 LockFreeStats, LockFreeWorkQueue, ObjectPool, PooledObject, PooledVector, StatsSnapshot,
134 VectorPoolStats,
135};
136
137pub use cache_optimized::SoAVectorStorage;
139
140#[cfg(test)]
141mod tests {
142 use super::*;
143
144 #[test]
145 fn test_version() {
146 let version = env!("CARGO_PKG_VERSION");
148 assert!(!version.is_empty(), "Version should not be empty");
149 assert!(
151 version.starts_with("2.") || version.starts_with("0.1."),
152 "Version should be 2.x or 0.1.x, got: {}",
153 version
154 );
155 }
156}