ruvector/examples
ruvnet 9fe29ff4de feat(esp32-mmwave-sensor): on-device parser self-test (iter 114)
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>
2026-05-02 13:56:24 -04:00
..
a2a-swarm feat(examples): a2a-swarm — 3-node demo of ADR-159 routing peer-forwarding 2026-04-25 16:59:18 -04:00
agentic-jujutsu feat: Add comprehensive agentic-jujutsu integration examples and tests 2025-11-22 03:12:31 +00:00
apify Add WebAssembly binary and TypeScript definitions for rvlite 2025-12-25 19:50:53 +00:00
app-clip feat(app-clip): add Swift App Clip skeleton for RVQS QR seed decoding 2026-02-15 18:34:13 +00:00
benchmarks chore(ci): green security audit + split test job into 6 matrix shards 2026-04-26 00:17:25 -04:00
boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
brain-boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
climate-consciousness chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
cmb-boundary-discovery chore(workspace): cargo fmt — mechanical whitespace fix across 427 files 2026-04-24 10:44:02 -04:00
cmb-consciousness chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
data chore(workspace): cargo fmt nested workspaces — rvf/, examples/* 2026-04-24 10:51:14 -04:00
decompiler-dashboard fix(decompiler): statement-boundary splitting — 14/14 modules now parse (was 2/17) 2026-04-03 11:50:34 +00:00
delta-behavior feat(delta-behavior): Complete Δ-behavior implementation with WASM 2026-01-28 04:18:34 +00:00
dna chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
docs docs: Organize examples/ with comprehensive READMEs 2025-11-29 14:05:04 +00:00
dragnes feat(sse): decouple SSE to mcp.pi.ruv.io proxy + Claude Code source research 2026-04-02 23:39:56 +00:00
earthquake-boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
ecosystem-consciousness chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
edge chore(workspace): cargo fmt nested workspaces — rvf/, examples/* 2026-04-24 10:51:14 -04:00
edge-full/pkg feat(edge-full): add unified WASM package with all modules 2025-12-31 20:59:29 +00:00
edge-net fix(brain): defer sparsifier build on startup for large graphs 2026-03-24 12:29:52 +00:00
esp32-mmwave-sensor feat(esp32-mmwave-sensor): on-device parser self-test (iter 114) 2026-05-02 13:56:24 -04:00
exo-ai-2025 chore: publish EXO-AI crates v0.1.1 with bug fixes and READMEs 2026-02-27 16:26:40 +00:00
frb-boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
gene-consciousness chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
google-cloud chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
graph docs: Organize examples/ with comprehensive READMEs 2025-11-29 14:05:04 +00:00
gw-consciousness chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
health-boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
infrastructure-boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
market-boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
meta-cognition-spiking-neural-network feat(gnn-v2): Comprehensive GNN v2 implementation with cognitive substrate (#43) 2025-12-02 11:26:10 -05:00
mincut chore(workspace): cargo fmt nested workspaces — rvf/, examples/* 2026-04-24 10:51:14 -04:00
music-boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
neural-trader docs(neural-trader): comprehensive README with features, benchmarks, use cases 2025-12-31 18:03:56 +00:00
nodejs docs: Organize examples/ with comprehensive READMEs 2025-11-29 14:05:04 +00:00
onnx-embeddings chore(workspace): cargo fmt nested workspaces — rvf/, examples/* 2026-04-24 10:51:14 -04:00
onnx-embeddings-wasm chore(workspace): cargo fmt nested workspaces — rvf/, examples/* 2026-04-24 10:51:14 -04:00
OSpipe fix: migrate attention/dag/tiny-dancer to workspace versioning and fix all dep version specs 2026-02-23 13:29:46 +00:00
pandemic-boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
prime-radiant chore(workspace): cargo fmt nested workspaces — rvf/, examples/* 2026-04-24 10:51:14 -04:00
pwa-loader feat(pwa-loader): add in-browser RVF seed decoder PWA 2026-02-15 18:38:10 +00:00
quantum-consciousness chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
real-eeg-analysis chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
real-eeg-multi-seizure chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
refrag-pipeline chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
robotics style: apply cargo fmt formatting 2026-03-12 20:57:18 -04:00
rust feat(postgres): Add HNSW index and embedding functions support (#62) 2025-12-09 11:14:52 -05:00
ruvLLM fix(ruvllm-esp32): portable stdio (compiles on every ESP32 variant) 2026-04-30 13:42:11 -04:00
rvf chore(workspace): cargo fmt nested workspaces — rvf/, examples/* 2026-04-24 10:51:14 -04:00
rvf-desktop feat(rvf): add Causal Atlas dashboard, solver fixes, and desktop app 2026-02-20 18:01:09 +00:00
rvf-kernel-optimized fix: format all files, add EXO crate READMEs, convert path deps to version deps 2026-02-27 16:21:14 +00:00
scipix test(scipix): mark stale OcrEngine doctest as ignore 2026-04-26 01:10:32 -04:00
seizure-clinical-report chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
seizure-therapeutic-sim chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
seti-boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
seti-exotic-signals chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
spiking-network feat(micro-hnsw-wasm): Add Neuromorphic HNSW v2.3 with SNN Integration (#40) 2025-12-01 22:30:15 -05:00
subpolynomial-time chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
temporal-attractor-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
train-discoveries chore(workspace): cargo fmt — mechanical whitespace fix across 427 files 2026-04-24 10:44:02 -04:00
ultra-low-latency-sim chore(workspace): cargo fmt nested workspaces — rvf/, examples/* 2026-04-24 10:51:14 -04:00
vectorvroom@4c2527b452 chore: import shaal/VectorVroom as submodule under examples/vectorvroom 2026-04-24 13:20:00 -04:00
verified-applications chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
vibecast-7sense chore(workspace): cargo fmt nested workspaces — rvf/, examples/* 2026-04-24 10:51:14 -04:00
void-boundary-discovery chore(workspace): cargo fmt — mechanical whitespace fix across 427 files 2026-04-24 10:44:02 -04:00
vwm-viewer feat: add package.json for rvdna example with WASM bindings and build scripts 2026-02-12 15:32:55 +00:00
wasm/ios feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
wasm-react docs: Organize examples/ with comprehensive READMEs 2025-11-29 14:05:04 +00:00
wasm-vanilla docs: Organize examples/ with comprehensive READMEs 2025-11-29 14:05:04 +00:00
weather-boundary-discovery chore(workspace): clippy-clean every crate under -D warnings + fmt + repair pre-existing broken benches 2026-04-25 17:00:20 -04:00
bounded_instance_demo.rs feat(mincut): Add subpolynomial-time dynamic minimum cut system (#74) 2025-12-23 07:53:32 -05:00
README.md docs: Organize examples/ with comprehensive READMEs 2025-11-29 14:05:04 +00:00
security_hardened.rvf feat(security): Security Hardened RVF v3.0 — 30 capabilities verified 2026-02-21 17:39:58 +00:00

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

License

MIT OR Apache-2.0