1#![allow(missing_docs)]
29#![warn(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 use advanced_features::{
78 ConformalConfig, ConformalPredictor, EnhancedPQ, FilterExpression, FilterStrategy,
79 FilteredSearch, HybridConfig, HybridSearch, MMRConfig, MMRSearch, PQConfig, PredictionSet,
80 BM25,
81};
82
83#[cfg(feature = "storage")]
84pub use agenticdb::{
85 AgenticDB, PolicyAction, PolicyEntry, PolicyMemoryStore, SessionStateIndex, SessionTurn,
86 WitnessEntry, WitnessLog,
87};
88
89#[cfg(feature = "api-embeddings")]
90pub use embeddings::ApiEmbedding;
91pub use embeddings::{BoxedEmbeddingProvider, EmbeddingProvider, HashEmbedding};
92
93#[cfg(feature = "real-embeddings")]
94pub use embeddings::CandleEmbedding;
95
96#[cfg(feature = "onnx-embeddings")]
97pub use embeddings::OnnxEmbedding;
98
99#[cfg(feature = "storage")]
101#[allow(deprecated, clippy::let_unit_value)]
102const _: () = {
103 #[deprecated(
104 since = "0.1.0",
105 note = "AgenticDB uses placeholder hash-based embeddings. For semantic search, use OnnxEmbedding (feature: onnx-embeddings) or ApiEmbedding. See ADR-114 for details."
106 )]
107 const AGENTICDB_EMBEDDING_WARNING: () = ();
108 let _ = AGENTICDB_EMBEDDING_WARNING;
109};
110
111pub use error::{Result, RuvectorError};
112pub use types::{DistanceMetric, SearchQuery, SearchResult, VectorEntry, VectorId};
113pub use vector_db::VectorDB;
114
115pub use quantization::{
117 BinaryQuantized, Int4Quantized, ProductQuantized, QuantizedVector, ScalarQuantized,
118};
119
120pub use arena::{Arena, ArenaVec, BatchVectorAllocator, CacheAlignedVec, CACHE_LINE_SIZE};
122
123#[cfg(all(feature = "parallel", not(target_arch = "wasm32")))]
125pub use lockfree::{
126 AtomicVectorPool, BatchItem, BatchResult, LockFreeBatchProcessor, LockFreeCounter,
127 LockFreeStats, LockFreeWorkQueue, ObjectPool, PooledObject, PooledVector, StatsSnapshot,
128 VectorPoolStats,
129};
130
131pub use cache_optimized::SoAVectorStorage;
133
134#[cfg(test)]
135mod tests {
136 use super::*;
137
138 #[test]
139 fn test_version() {
140 let version = env!("CARGO_PKG_VERSION");
142 assert!(!version.is_empty(), "Version should not be empty");
143 assert!(
145 version.starts_with("2.") || version.starts_with("0.1."),
146 "Version should be 2.x or 0.1.x, got: {}",
147 version
148 );
149 }
150}