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