mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 13:54:31 +00:00
* feat(ruvector): implement missing capabilities (ADR-143) - speculativeEmbed: real FNV-1a hash embedding (128-dim) from file content - ragRetrieve: cosine similarity on embeddings + TF-IDF keyword fallback - contextRank: TF-IDF weighted scoring instead of raw keyword matching - Remove false DiskANN claim (will implement as Rust crate next) Co-Authored-By: claude-flow <ruv@ruv.net> * feat(diskann): Vamana graph + PQ — SSD-friendly billion-scale ANN (ADR-143) New Rust crate: ruvector-diskann Core algorithm (NeurIPS 2019 DiskANN paper): - Vamana graph with α-robust pruning (bounded out-degree R) - k-means++ seeded Product Quantization (M subspaces, 256 centroids) - Asymmetric PQ distance tables for fast candidate filtering - Two-phase search: PQ-filtered beam search → exact re-ranking - Memory-mapped persistence (mmap vectors + binary graph) Performance characteristics: - L2-squared distance with 8-wide loop unrolling (auto-vectorized) - Greedy beam search with bounded visited set - Save/load with flat binary format (mmap-friendly) 9 tests passing: distance, PQ train/encode, Vamana build/search, bounded degree, full index CRUD, PQ-accelerated search, save/load. Co-Authored-By: claude-flow <ruv@ruv.net> * feat(diskann): NAPI-RS bindings + npm package + 14 tests passing Rust core (ruvector-diskann): - 4-accumulator L2 distance for ILP optimization - Recall@10 = 1.000 on 2K vectors - Search latency: 90µs (5K vectors, 128d, k=10) - 14 tests: distance, PQ, Vamana, recall, scale, edge cases NAPI-RS bindings (ruvector-diskann-node): - Sync + async build/search - Batch insert (flat Float32Array) - Save/load, delete, count - Thread-safe via parking_lot::RwLock npm package (@ruvector/diskann): - Platform-specific loader (linux/darwin/win) - TypeScript declarations - Node.js test passing Co-Authored-By: claude-flow <ruv@ruv.net> * ci(diskann): add cross-platform build + publish workflow 5 targets: linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64 Co-Authored-By: claude-flow <ruv@ruv.net> * perf(diskann): FlatVectors + VisitedSet + ILP + optional SIMD/GPU Optimizations applied: - FlatVectors: contiguous f32 slab (eliminates Vec<Vec> indirection) - VisitedSet: O(1) clear via generation counter (replaces HashSet) - 4-accumulator ILP for L2 distance (auto-vectorized) - Flat PQ distance table (cache-line friendly) - Parallel medoid finding via rayon - Zero-copy save (write flat slab directly) - Optional simsimd feature for hardware NEON/AVX2/AVX-512 - Optional gpu feature with Metal/CUDA/Vulkan dispatch stubs Results (5K vectors, 128d): - Search: 90µs → 55µs (1.6x faster) - Build: 6.9s → 6.2s (10% faster) - Recall@10: 0.998 (maintained) - 17 tests passing Co-Authored-By: claude-flow <ruv@ruv.net> --------- Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
251 lines
7.5 KiB
TOML
251 lines
7.5 KiB
TOML
[workspace]
|
|
exclude = ["crates/micro-hnsw-wasm", "crates/ruvector-hyperbolic-hnsw", "crates/ruvector-hyperbolic-hnsw-wasm", "examples/ruvLLM/esp32", "examples/ruvLLM/esp32-flash", "examples/edge-net", "examples/data", "examples/ruvLLM", "examples/delta-behavior", "crates/rvf", "crates/rvf/*", "crates/rvf/*/*", "examples/rvf-desktop", "crates/mcp-brain-server"]
|
|
members = [
|
|
"crates/ruvector-core",
|
|
"crates/ruvector-node",
|
|
"crates/ruvector-wasm",
|
|
"crates/ruvector-cli",
|
|
"crates/ruvector-bench",
|
|
"crates/ruvector-metrics",
|
|
"crates/ruvector-filter",
|
|
"crates/ruvector-router-core",
|
|
"crates/ruvector-router-cli",
|
|
"crates/ruvector-router-ffi",
|
|
"crates/ruvector-router-wasm",
|
|
"crates/ruvector-server",
|
|
"crates/ruvector-snapshot",
|
|
"crates/ruvector-tiny-dancer-core",
|
|
"crates/ruvector-tiny-dancer-wasm",
|
|
"crates/ruvector-tiny-dancer-node",
|
|
"crates/ruvector-collections",
|
|
"crates/ruvector-cluster",
|
|
"crates/ruvector-raft",
|
|
"crates/ruvector-replication",
|
|
"crates/ruvector-graph",
|
|
"crates/ruvector-graph-node",
|
|
"crates/ruvector-graph-wasm",
|
|
"crates/ruvector-gnn",
|
|
"crates/ruvector-gnn-node",
|
|
"crates/ruvector-gnn-wasm",
|
|
"crates/ruvector-attention",
|
|
"crates/ruvector-attention-wasm",
|
|
"crates/ruvector-attention-node",
|
|
"crates/ruvector-cnn",
|
|
"crates/ruvector-cnn-wasm",
|
|
"crates/ruvector-mincut",
|
|
"crates/ruvector-mincut-wasm",
|
|
"crates/ruvector-mincut-node",
|
|
"crates/ruvector-mincut-gated-transformer",
|
|
"crates/ruvector-mincut-gated-transformer-wasm",
|
|
"crates/ruvector-postgres",
|
|
"crates/ruvector-nervous-system",
|
|
"examples/refrag-pipeline",
|
|
"examples/scipix",
|
|
"examples/google-cloud",
|
|
"examples/subpolynomial-time",
|
|
"crates/sona",
|
|
"crates/rvlite",
|
|
"crates/ruvector-nervous-system",
|
|
"crates/ruvector-dag",
|
|
"crates/ruvector-dag-wasm",
|
|
"crates/ruvector-nervous-system-wasm",
|
|
"crates/ruvector-economy-wasm",
|
|
"crates/ruvector-learning-wasm",
|
|
"crates/ruvector-exotic-wasm",
|
|
"crates/ruvector-attention-unified-wasm",
|
|
"crates/ruvector-fpga-transformer",
|
|
"crates/ruvector-fpga-transformer-wasm",
|
|
"crates/ruvector-sparse-inference",
|
|
"crates/ruvector-math",
|
|
"crates/ruvector-math-wasm",
|
|
"examples/benchmarks",
|
|
"crates/cognitum-gate-kernel",
|
|
"crates/cognitum-gate-tilezero",
|
|
"crates/mcp-gate",
|
|
"crates/mcp-brain",
|
|
"crates/mcp-brain-server",
|
|
"crates/ruQu",
|
|
"crates/ruvllm",
|
|
"crates/ruvllm-cli",
|
|
"crates/ruvllm-wasm",
|
|
"crates/prime-radiant",
|
|
"crates/ruvector-delta-core",
|
|
"crates/ruvector-delta-wasm",
|
|
"crates/ruvector-delta-index",
|
|
"crates/ruvector-delta-graph",
|
|
"crates/ruvector-delta-consensus",
|
|
"crates/ruvector-crv",
|
|
"crates/ruvector-temporal-tensor",
|
|
"crates/ruqu-core",
|
|
"crates/ruqu-algorithms",
|
|
"crates/ruqu-wasm",
|
|
"crates/ruqu-exotic",
|
|
"crates/ruvector-domain-expansion",
|
|
"crates/ruvector-domain-expansion-wasm",
|
|
"crates/ruvector-solver",
|
|
"crates/ruvector-solver-wasm",
|
|
"crates/ruvector-solver-node",
|
|
"examples/dna",
|
|
"examples/OSpipe",
|
|
"crates/ruvector-coherence",
|
|
"crates/ruvector-profiler",
|
|
"crates/ruvector-attn-mincut",
|
|
"crates/ruvector-cognitive-container",
|
|
"crates/ruvector-verified",
|
|
"crates/ruvector-verified-wasm",
|
|
"crates/ruvector-graph-transformer",
|
|
"crates/ruvector-graph-transformer-wasm",
|
|
"crates/ruvector-graph-transformer-node",
|
|
"examples/rvf-kernel-optimized",
|
|
"examples/verified-applications",
|
|
"crates/thermorust",
|
|
"crates/ruvector-dither",
|
|
"crates/ruvector-robotics",
|
|
"examples/robotics",
|
|
"crates/neural-trader-core",
|
|
"crates/neural-trader-coherence",
|
|
"crates/neural-trader-replay",
|
|
"crates/neural-trader-wasm",
|
|
# RuVix Cognition Kernel (organized under crates/ruvix/)
|
|
"crates/ruvix/crates/types",
|
|
"crates/ruvix/crates/region",
|
|
"crates/ruvix/crates/queue",
|
|
"crates/ruvix/crates/cap",
|
|
"crates/ruvix/crates/proof",
|
|
"crates/ruvix/crates/sched",
|
|
"crates/ruvix/crates/boot",
|
|
"crates/ruvix/crates/vecgraph",
|
|
"crates/ruvix/crates/nucleus",
|
|
# Phase B: Bare metal AArch64 support
|
|
"crates/ruvix/crates/hal",
|
|
"crates/ruvix/crates/aarch64",
|
|
"crates/ruvix/crates/drivers",
|
|
"crates/ruvix/tests",
|
|
"crates/ruvix/benches",
|
|
"crates/ruvix/examples/cognitive_demo",
|
|
# rvAgent — AI Agent Framework (DeepAgents Rust conversion)
|
|
"crates/rvAgent/rvagent-core",
|
|
"crates/rvAgent/rvagent-backends",
|
|
"crates/rvAgent/rvagent-middleware",
|
|
"crates/rvAgent/rvagent-tools",
|
|
"crates/rvAgent/rvagent-subagents",
|
|
"crates/rvAgent/rvagent-cli",
|
|
"crates/rvAgent/rvagent-acp",
|
|
"crates/rvAgent/rvagent-mcp",
|
|
"crates/rvAgent/rvagent-wasm",
|
|
# ETL pipeline example
|
|
"examples/train-discoveries",
|
|
# Spectral graph sparsification
|
|
"crates/ruvector-sparsifier",
|
|
"crates/ruvector-sparsifier-wasm",
|
|
# Consciousness metrics (IIT Φ, causal emergence)
|
|
"crates/ruvector-consciousness",
|
|
"crates/ruvector-consciousness-wasm",
|
|
"examples/cmb-consciousness",
|
|
"examples/gw-consciousness",
|
|
"examples/ecosystem-consciousness",
|
|
"examples/quantum-consciousness",
|
|
"examples/gene-consciousness",
|
|
"examples/climate-consciousness",
|
|
# JS bundle decompiler (ADR-135)
|
|
"crates/ruvector-decompiler",
|
|
"crates/ruvector-decompiler-wasm",
|
|
# DiskANN / Vamana (ADR-143)
|
|
"crates/ruvector-diskann",
|
|
"crates/ruvector-diskann-node",
|
|
]
|
|
resolver = "2"
|
|
|
|
[workspace.package]
|
|
version = "2.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.77"
|
|
license = "MIT"
|
|
authors = ["Ruvector Team"]
|
|
repository = "https://github.com/ruvnet/ruvector"
|
|
|
|
[workspace.dependencies]
|
|
# Core functionality
|
|
redb = "2.1"
|
|
memmap2 = "0.9"
|
|
hnsw_rs = "0.3"
|
|
simsimd = "5.9"
|
|
rayon = "1.10"
|
|
crossbeam = "0.8"
|
|
|
|
# Serialization
|
|
rkyv = "0.8"
|
|
bincode = { version = "2.0.0-rc.3", features = ["serde"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
|
|
# Node.js bindings
|
|
napi = { version = "2.16", default-features = false, features = ["napi9", "async", "tokio_rt"] }
|
|
napi-derive = "2.16"
|
|
|
|
# WASM
|
|
wasm-bindgen = "0.2"
|
|
wasm-bindgen-futures = "0.4"
|
|
js-sys = "0.3"
|
|
web-sys = { version = "0.3", features = ["Worker", "MessagePort", "console"] }
|
|
getrandom = { version = "0.3", features = ["wasm_js"] }
|
|
|
|
# Async runtime
|
|
tokio = { version = "1.41", features = ["rt-multi-thread", "sync", "macros"] }
|
|
futures = "0.3"
|
|
|
|
# Error handling and utilities
|
|
thiserror = "2.0"
|
|
anyhow = "1.0"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
# Math and numerics
|
|
nalgebra = { version = "0.33", default-features = false, features = ["std"] }
|
|
ndarray = "0.16"
|
|
rand = "0.8"
|
|
rand_distr = "0.4"
|
|
|
|
# Time and UUID
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
uuid = { version = "1.11", features = ["v4", "serde", "js"] }
|
|
|
|
# CLI
|
|
clap = { version = "4.5", features = ["derive", "cargo"] }
|
|
indicatif = "0.17"
|
|
console = "0.15"
|
|
|
|
# Testing and benchmarking
|
|
criterion = { version = "0.5", features = ["html_reports"] }
|
|
proptest = "1.5"
|
|
mockall = "0.13"
|
|
|
|
# Formal verification
|
|
lean-agentic = "=0.1.0"
|
|
|
|
# Performance
|
|
dashmap = "6.1"
|
|
parking_lot = "0.12"
|
|
once_cell = "1.20"
|
|
|
|
[profile.release]
|
|
opt-level = 3
|
|
lto = "fat"
|
|
codegen-units = 1
|
|
strip = true
|
|
panic = "unwind"
|
|
|
|
[profile.bench]
|
|
inherits = "release"
|
|
debug = true
|
|
|
|
[profile.dev]
|
|
opt-level = 0
|
|
debug = true
|
|
|
|
[profile.test]
|
|
|
|
# Patch hnsw_rs to use rand 0.8 instead of 0.9 for WASM compatibility
|
|
# This resolves the getrandom version conflict (0.2 vs 0.3)
|
|
[patch.crates-io]
|
|
hnsw_rs = { path = "./patches/hnsw_rs" }
|