ruvector/patches
rUv 27dd773fb9 feat(npm): add @ruvector/rudag package with WASM and IndexedDB
- Create npm/packages/rudag with TypeScript SDK
- WASM-accelerated DAG operations via ruvector-dag-wasm
- IndexedDB persistence for browser environments
- MemoryStorage fallback for Node.js
- CLI tool for DAG operations (rudag command)
- Restore patches/hnsw_rs for WASM builds

Features:
- DagOperator enum (SCAN, FILTER, PROJECT, JOIN, etc.)
- AttentionMechanism enum (TOPOLOGICAL, CRITICAL_PATH, UNIFORM)
- RuDag class with auto-save to IndexedDB
- BrowserDagManager for browser-specific management
- NodeDagManager with file-based persistence

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 15:59:16 +00:00
..
hnsw_rs feat(npm): add @ruvector/rudag package with WASM and IndexedDB 2025-12-30 15:59:16 +00:00
README.md fix: add patches README and fix rust formatting 2025-12-30 15:41:45 +00:00

Patches Directory

CRITICAL: Do not delete this directory or its contents!

This directory contains patched versions of external crates that are necessary for building RuVector.

hnsw_rs

The hnsw_rs directory contains a patched version of the hnsw_rs crate.

Why this patch exists

The official hnsw_rs crate uses rand 0.9 which is incompatible with WebAssembly (WASM) builds. This patched version:

  1. Uses rand 0.8 instead of rand 0.9 for WASM compatibility
  2. Uses Rust edition 2021 (not 2024) for stable Rust toolchain compatibility

How it's used

The patch is applied via Cargo.toml at the workspace root:

[patch.crates-io]
hnsw_rs = { path = "./patches/hnsw_rs" }

This ensures all workspace crates that depend on hnsw_rs use this patched version.

What depends on it

  • ruvector-core (with hnsw feature enabled by default)
  • ruvector-graph (with hnsw_rs feature)
  • All native builds (Node.js bindings, CLI tools)

Consequences of deletion

If this directory is deleted:

  • All CI builds will fail (Build Native Modules, PostgreSQL Extension CI, etc.)
  • cargo build will fail with "failed to load source for dependency hnsw_rs"
  • The project cannot be compiled

Updating the patch

If you need to update hnsw_rs:

  1. Download the new version from crates.io
  2. Apply the rand 0.8 compatibility changes from the current patch
  3. Test WASM and native builds before committing