yvdb 0.1.4

Educational in-memory vector DB: WAL + bincode snapshots (TOON header), IVF bucket search, Axum REST API, TOON query responses
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//src/app_state.rs
//shared handles passed into every axum handler (store, wal, config, server start time)
use std::sync::Arc;
use std::time::Instant;

use crate::config::Config;
use crate::persist::wal::Wal;
use crate::store::Store;

#[derive(Clone)]
pub struct AppState {
    pub store: Arc<Store>,
    pub wal: Arc<Wal>,
    pub config: Arc<Config>,
    pub start_time: Instant,
}