#![allow(missing_docs)]
#![warn(clippy::all)]
#![allow(clippy::incompatible_msrv)]
pub mod advanced_features;
#[cfg(feature = "storage")]
pub mod agenticdb;
pub mod distance;
pub mod embeddings;
pub mod error;
pub mod index;
pub mod quantization;
#[cfg(feature = "storage")]
pub mod storage;
#[cfg(not(feature = "storage"))]
pub mod storage_memory;
#[cfg(not(feature = "storage"))]
pub use storage_memory as storage;
pub mod types;
pub mod vector_db;
pub mod arena;
pub mod cache_optimized;
#[cfg(all(feature = "parallel", not(target_arch = "wasm32")))]
pub mod lockfree;
pub mod simd_intrinsics;
pub mod memory;
pub mod advanced;
pub use advanced_features::{
ConformalConfig, ConformalPredictor, EnhancedPQ, FilterExpression, FilterStrategy,
FilteredSearch, FusionConfig, FusionStrategy, HybridConfig, HybridSearch, MMRConfig,
MMRSearch, PQConfig, PredictionSet, ScoredDoc, SparseIndex, SparseVector, BM25,
fuse_rankings,
};
#[cfg(feature = "storage")]
pub use agenticdb::{
AgenticDB, PolicyAction, PolicyEntry, PolicyMemoryStore, SessionStateIndex, SessionTurn,
WitnessEntry, WitnessLog,
};
#[cfg(feature = "api-embeddings")]
pub use embeddings::ApiEmbedding;
pub use embeddings::{BoxedEmbeddingProvider, EmbeddingProvider, HashEmbedding};
#[cfg(feature = "real-embeddings")]
pub use embeddings::CandleEmbedding;
#[cfg(feature = "onnx-embeddings")]
pub use embeddings::OnnxEmbedding;
#[cfg(feature = "storage")]
#[allow(deprecated, clippy::let_unit_value)]
const _: () = {
#[deprecated(
since = "0.1.0",
note = "AgenticDB uses placeholder hash-based embeddings. For semantic search, use OnnxEmbedding (feature: onnx-embeddings) or ApiEmbedding. See ADR-114 for details."
)]
const AGENTICDB_EMBEDDING_WARNING: () = ();
let _ = AGENTICDB_EMBEDDING_WARNING;
};
pub use error::{Result, RuvectorError};
pub use types::{DistanceMetric, SearchQuery, SearchResult, VectorEntry, VectorId};
pub use vector_db::VectorDB;
pub use quantization::{
BinaryQuantized, Int4Quantized, ProductQuantized, QuantizedVector, ScalarQuantized,
};
pub use arena::{Arena, ArenaVec, BatchVectorAllocator, CacheAlignedVec, CACHE_LINE_SIZE};
#[cfg(all(feature = "parallel", not(target_arch = "wasm32")))]
pub use lockfree::{
AtomicVectorPool, BatchItem, BatchResult, LockFreeBatchProcessor, LockFreeCounter,
LockFreeStats, LockFreeWorkQueue, ObjectPool, PooledObject, PooledVector, StatsSnapshot,
VectorPoolStats,
};
pub use cache_optimized::SoAVectorStorage;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_version() {
let version = env!("CARGO_PKG_VERSION");
assert!(!version.is_empty(), "Version should not be empty");
assert!(
version.starts_with("2.") || version.starts_with("0.1."),
"Version should be 2.x or 0.1.x, got: {}",
version
);
}
}