mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-30 20:43:38 +00:00
Honest read of "100% real and optimized" — iter A was real (parser
ports cleanly, 10 host tests pass, firmware boots on the device) but
the on-device parser had only been compile-tested, never *executed*
end-to-end. Without the radar wired, the UART path produces zero
frames, so we couldn't tell if the parser actually works on Xtensa.
Adds a synthetic-fixture self-test that runs at boot:
src/selftest.rs (new)
- 8 fixture cases mirroring the host #[cfg(test)] suite:
breathing, heart-rate, distance (BE-decode), presence-absent,
presence-present, unknown-frame-type, tampered-header (must
surface ChecksumError), invert_xor reference value (0xE1)
- Builds frames using the same `make_frame` shape as the host
`frame()` helper so on-device + host fixtures are byte-identical
- run() returns Ok(N) or Err(case_name) on first failure
src/main.rs
- Calls selftest::run() before the UART loop
- On failure: error!() the reason and spin (watchdog reboots)
- On success: stash SelftestOutcome::Pass(N) and **thread it into
the 1 Hz status print** — USB-Serial-JTAG has no rx-side buffer,
so a one-shot info!() at boot is lost the moment the host's
`cat /dev/ttyACM0` opens the port. Repeating the result on
every status line trades 30 bytes per line for guaranteed
observability across any host-attach time.
src/parser.rs
- Re-exports `invert_xor` as `invert_xor_public` so the self-test
can build matching fixture frames.
sdkconfig.defaults
- Reverted the no-op iter-114 prune (CONFIG_BT_ENABLED=n etc. —
the linker was already dropping unreferenced archives, prune
didn't shrink the binary). Kept CONFIG_COMPILER_OPTIMIZATION_SIZE=y
and CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y — both real, measurable.
- Documented honest reason: 315 KB .text floor is the IDF C
runtime (FreeRTOS + log + heap + vfs + newlib) which is
force-linked. Real shrink path is bare-metal `esp-hal` — deferred.
Live evidence (cat /dev/ttyACM0 captures the persistent status line):
I (1739) ruvector_mmwave_sensor:
vitals hr_bpm=None br_bpm=None dist_cm=None present=None
frames_total=0 corrupt=0 unknown=0 selftest=PASS(8)
I (3239) ruvector_mmwave_sensor: ... selftest=PASS(8)
I (4739) ruvector_mmwave_sensor: ... selftest=PASS(8)
8/8 parser fixtures decoded correctly on Xtensa, same code path as
host tests. Firmware footprint: 398 KB / 16 MB (2.43%, +2 KB for the
self-test). Build clean: `cargo +esp build --release` finishes in
~18s warm, no warnings.
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|---|---|---|
| .. | ||
| a2a-swarm | ||
| agentic-jujutsu | ||
| apify | ||
| app-clip | ||
| benchmarks | ||
| boundary-discovery | ||
| brain-boundary-discovery | ||
| climate-consciousness | ||
| cmb-boundary-discovery | ||
| cmb-consciousness | ||
| data | ||
| decompiler-dashboard | ||
| delta-behavior | ||
| dna | ||
| docs | ||
| dragnes | ||
| earthquake-boundary-discovery | ||
| ecosystem-consciousness | ||
| edge | ||
| edge-full/pkg | ||
| edge-net | ||
| esp32-mmwave-sensor | ||
| exo-ai-2025 | ||
| frb-boundary-discovery | ||
| gene-consciousness | ||
| google-cloud | ||
| graph | ||
| gw-consciousness | ||
| health-boundary-discovery | ||
| infrastructure-boundary-discovery | ||
| market-boundary-discovery | ||
| meta-cognition-spiking-neural-network | ||
| mincut | ||
| music-boundary-discovery | ||
| neural-trader | ||
| nodejs | ||
| onnx-embeddings | ||
| onnx-embeddings-wasm | ||
| OSpipe | ||
| pandemic-boundary-discovery | ||
| prime-radiant | ||
| pwa-loader | ||
| quantum-consciousness | ||
| real-eeg-analysis | ||
| real-eeg-multi-seizure | ||
| refrag-pipeline | ||
| robotics | ||
| rust | ||
| ruvLLM | ||
| rvf | ||
| rvf-desktop | ||
| rvf-kernel-optimized | ||
| scipix | ||
| seizure-clinical-report | ||
| seizure-therapeutic-sim | ||
| seti-boundary-discovery | ||
| seti-exotic-signals | ||
| spiking-network | ||
| subpolynomial-time | ||
| temporal-attractor-discovery | ||
| train-discoveries | ||
| ultra-low-latency-sim | ||
| vectorvroom@4c2527b452 | ||
| verified-applications | ||
| vibecast-7sense | ||
| void-boundary-discovery | ||
| vwm-viewer | ||
| wasm/ios | ||
| wasm-react | ||
| wasm-vanilla | ||
| weather-boundary-discovery | ||
| bounded_instance_demo.rs | ||
| README.md | ||
| security_hardened.rvf | ||
RuVector Examples
Comprehensive examples demonstrating RuVector's capabilities across multiple platforms and use cases.
Directory Structure
examples/
├── rust/ # Rust SDK examples
├── nodejs/ # Node.js SDK examples
├── graph/ # Graph database features
├── wasm-react/ # React + WebAssembly integration
├── wasm-vanilla/ # Vanilla JS + WebAssembly
├── agentic-jujutsu/ # AI agent version control
├── exo-ai-2025/ # Advanced cognitive substrate
├── refrag-pipeline/ # Document processing pipeline
└── docs/ # Additional documentation
Quick Start by Platform
Rust
cd rust
cargo run --example basic_usage
cargo run --example advanced_features
cargo run --example agenticdb_demo
Node.js
cd nodejs
npm install
node basic_usage.js
node semantic_search.js
WebAssembly (React)
cd wasm-react
npm install
npm run dev
WebAssembly (Vanilla)
cd wasm-vanilla
# Open index.html in browser
Example Categories
| Category | Directory | Description |
|---|---|---|
| Core API | rust/basic_usage.rs |
Vector DB fundamentals |
| Batch Ops | rust/batch_operations.rs |
High-throughput ingestion |
| RAG Pipeline | rust/rag_pipeline.rs |
Retrieval-Augmented Generation |
| Advanced | rust/advanced_features.rs |
Hypergraphs, neural hashing |
| AgenticDB | rust/agenticdb_demo.rs |
AI agent memory system |
| GNN | rust/gnn_example.rs |
Graph Neural Networks |
| Graph | graph/ |
Cypher queries, clustering |
| Node.js | nodejs/ |
JavaScript integration |
| WASM React | wasm-react/ |
Modern React apps |
| WASM Vanilla | wasm-vanilla/ |
Browser without framework |
| Agentic Jujutsu | agentic-jujutsu/ |
Multi-agent version control |
| EXO-AI 2025 | exo-ai-2025/ |
Cognitive substrate research |
| Refrag | refrag-pipeline/ |
Document fragmentation |
Feature Highlights
Vector Database Core
- High-performance similarity search
- Multiple distance metrics (Cosine, Euclidean, Dot Product)
- Metadata filtering
- Batch operations
Advanced Features
- Hypergraph Index: Multi-entity relationships
- Temporal Hypergraph: Time-aware relationships
- Causal Memory: Cause-effect chains
- Learned Index: ML-optimized indexing
- Neural Hash: Locality-sensitive hashing
- Topological Analysis: Persistent homology
AgenticDB
- Reflexion episodes (self-critique)
- Skill library (consolidated patterns)
- Causal memory (hypergraph relationships)
- Learning sessions (RL training data)
- Vector embeddings (core storage)
EXO-AI Cognitive Substrate
- exo-core: IIT consciousness, thermodynamics
- exo-temporal: Causal memory coordination
- exo-hypergraph: Topological structures
- exo-manifold: Continuous deformation
- exo-exotic: 10 cutting-edge experiments
- exo-wasm: Browser deployment
- exo-federation: Distributed consensus
- exo-node: Native bindings
- exo-backend-classical: Classical compute
Running Benchmarks
# Rust benchmarks
cargo bench --example advanced_features
# Refrag pipeline benchmarks
cd refrag-pipeline
cargo bench
# EXO-AI benchmarks
cd exo-ai-2025
cargo bench
Related Documentation
License
MIT OR Apache-2.0