The Rust port lived two directories deep (rust-port/wifi-densepose-rs/) without any sibling under rust-port/ that warranted the extra level. Move the whole workspace up to v2/ to match v1/ (Python) at the same depth and shorten every cd / build command across the repo. git mv preserves history for all tracked files. 60 files updated for path references (CI workflows, ADRs, docs, scripts, READMEs, internal .claude-flow state). Two manual fixes for relative-cd paths in CLAUDE.md and ADR-043 that became wrong after the depth change (cd ../.. → cd ..). Validated: - cargo check --workspace --no-default-features → clean (after target/ nuke; the gitignored target/ was carried by the OS rename and had hard-coded old paths in build scripts) - cargo test --workspace --no-default-features → 1,539 passed, 0 failed, 8 ignored (same totals as pre-rename) - ESP32-S3 on COM7 → still streaming live CSI (cb #40300, RSSI -64 dBm) After-merge follow-up: contributors should `rm -rf v2/target` once and let cargo regenerate from the new path. |
||
|---|---|---|
| .. | ||
| benches | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
README.md
ruv-neural-memory
Persistent neural state memory with vector search and longitudinal tracking.
Overview
ruv-neural-memory provides in-memory and persistent storage for neural
embeddings, supporting brute-force and HNSW-based approximate nearest neighbor
search. It includes session-based memory management for organizing recordings
by subject and session, longitudinal drift detection for tracking embedding
distribution changes over time, and RVF/bincode persistence for durable storage.
Features
- Embedding store (
store):NeuralMemoryStorefor inserting, querying, and managing collections ofNeuralEmbeddingvalues with brute-force nearest neighbor search - HNSW index (
hnsw):HnswIndexfor approximate nearest neighbor search with configurable M (max connections), ef_construction, and ef_search parameters; provides 150x-12,500x speedup over brute-force for large collections - Session management (
session):SessionMemoryandSessionMetadatafor organizing embeddings by recording session, subject ID, and timestamp ranges - Longitudinal tracking (
longitudinal):LongitudinalTrackerfor detecting embedding distribution drift over time withTrendDirectionclassification (stable, increasing, decreasing) - Persistence (
persistence):save_store/load_storefor bincode serialization,save_rvf/load_rvffor RuVector format I/O
Usage
use ruv_neural_memory::{
NeuralMemoryStore, HnswIndex, SessionMemory, SessionMetadata,
LongitudinalTracker, save_store, load_store,
};
use ruv_neural_core::{NeuralEmbedding, EmbeddingMetadata, Atlas};
// Create a memory store and insert embeddings
let mut store = NeuralMemoryStore::new();
let meta = EmbeddingMetadata {
subject_id: Some("sub-01".into()),
session_id: Some("ses-01".into()),
cognitive_state: None,
source_atlas: Atlas::Schaefer100,
embedding_method: "spectral".into(),
};
let emb = NeuralEmbedding::new(vec![0.1, 0.5, -0.3], 0.0, meta).unwrap();
store.insert(emb);
// Query nearest neighbors (brute-force)
let query = vec![0.1, 0.4, -0.2];
let neighbors = store.query_nearest(&query, 5);
// Build HNSW index for fast approximate search
let mut hnsw = HnswIndex::new(16, 200);
// ... insert vectors, then search
// Session-based memory management
let session = SessionMemory::new(SessionMetadata {
subject_id: "sub-01".into(),
session_id: "ses-01".into(),
..Default::default()
});
// Persistence
save_store(&store, "memory.bin").unwrap();
let loaded = load_store("memory.bin").unwrap();
API Reference
| Module | Key Types / Functions |
|---|---|
store |
NeuralMemoryStore |
hnsw |
HnswIndex |
session |
SessionMemory, SessionMetadata |
longitudinal |
LongitudinalTracker, TrendDirection |
persistence |
save_store, load_store, save_rvf, load_rvf |
Feature Flags
| Feature | Default | Description |
|---|---|---|
std |
Yes | Standard library support |
wasm |
No | WASM-compatible storage |
Integration
Depends on ruv-neural-core for NeuralEmbedding types. Receives embeddings
from ruv-neural-embed. Stored embeddings are queried by ruv-neural-decoder
for KNN-based cognitive state classification. Uses bincode for efficient
binary serialization.
License
MIT OR Apache-2.0