Skip to main content

rvf_runtime/
lib.rs

1//! RuVector Format runtime — the main user-facing API.
2//!
3//! This crate provides [`RvfStore`], the primary interface for creating,
4//! opening, querying, and managing RVF vector stores. It ties together
5//! the segment model, manifest system, HNSW indexing, quantization, and
6//! compaction into a single cohesive runtime.
7//!
8//! # Architecture
9//!
10//! - **Append-only writes**: All mutations append new segments; no in-place edits.
11//! - **Progressive boot**: Readers see results before the full file is loaded.
12//! - **Single-writer / multi-reader**: Advisory lock file enforces exclusivity.
13//! - **Background compaction**: Dead space is reclaimed without blocking queries.
14
15pub mod adversarial;
16pub mod compaction;
17pub mod compress;
18pub mod cow;
19pub mod cow_compact;
20pub mod cow_map;
21pub mod deletion;
22pub mod dos;
23pub mod ffi;
24pub mod filter;
25pub mod locking;
26pub mod membership;
27pub mod options;
28#[cfg(feature = "qr")]
29pub mod qr_encode;
30pub mod qr_seed;
31pub mod read_path;
32pub mod safety_net;
33pub mod seed_crypto;
34pub mod status;
35pub mod store;
36pub mod witness;
37pub mod write_path;
38pub mod agi_authority;
39pub mod agi_coherence;
40pub mod agi_container;
41
42pub use adversarial::{
43    adaptive_n_probe, centroid_distance_cv, combined_effective_n_probe,
44    effective_n_probe_with_drift, is_degenerate_distribution, DEGENERATE_CV_THRESHOLD,
45};
46pub use cow::{CowEngine, CowStats, WitnessEvent};
47pub use cow_compact::CowCompactor;
48pub use cow_map::CowMap;
49pub use dos::{BudgetTokenBucket, NegativeCache, ProofOfWork, QuerySignature};
50pub use filter::FilterExpr;
51pub use membership::MembershipFilter;
52pub use options::{
53    CompactionResult, DeleteResult, IngestResult, MetadataEntry, MetadataValue, QueryOptions,
54    QualityEnvelope, RvfOptions, SearchResult, WitnessConfig,
55};
56pub use compress::{compress, decompress, CompressError};
57pub use qr_seed::{
58    BootstrapProgress, DownloadManifest, ParsedSeed, SeedBuilder, SeedError,
59    make_host_entry,
60};
61pub use seed_crypto::{
62    seed_content_hash, layer_content_hash, full_content_hash,
63    sign_seed, verify_seed, verify_layer, SIG_ALGO_HMAC_SHA256,
64};
65#[cfg(feature = "ed25519")]
66pub use seed_crypto::{
67    sign_seed_ed25519, verify_seed_ed25519, SIG_ALGO_ED25519,
68};
69#[cfg(feature = "qr")]
70pub use qr_encode::{QrEncoder, QrCode, QrError, EcLevel};
71pub use safety_net::{
72    selective_safety_net_scan, should_activate_safety_net, Candidate, SafetyNetResult,
73};
74pub use status::StoreStatus;
75pub use store::RvfStore;
76pub use witness::{
77    GovernancePolicy, ParsedWitness, ScorecardBuilder, WitnessBuilder, WitnessError,
78};
79pub use agi_container::{
80    AgiContainerBuilder, ParsedAgiManifest,
81};