ruvector-wasm-v2.3.1
ruvnet/RuVectorruvector-wasm-v2.3.1Oct 6, 2026by ruvnet
Upgrading?
AI Summary
Fixes critical IndexedDB persistence bugs where `saveToIndexedDB` reported success without saving data and `loadFromIndexedDB` was unimplemented. Now supports versioned snapshots, transaction commit gating, and deterministic database reloading.
Key Highlights
- Fixed `saveToIndexedDB` to actually commit data after transaction completion
- Implemented `VectorDB.loadFromIndexedDB(name)` as a static async method
- Added `setDbName(name)` for persistent database naming (1-128 chars)
- HNSW graph is rebuilt on load from snapshot
- Database is stored as one versioned snapshot record
Breaking Changes
- `VectorDB.loadFromIndexedDB` is no longer a stub; it is now a required static async method
- `saveToIndexedDB` is commit-gated and can now reject on quota exceeded or abort
- Added `setDbName` API; instances now save under a random name by default unless named
New Features
- Versioned snapshot storage
- HNSW graph rebuilding on load
- Database naming and retrieval
- Transaction commit gating with error handling
- Validation for invalid or corrupt payloads during load
Full Release Notes
## ruvector-wasm 2.3.1 / @ruvector/wasm 0.2.1 — IndexedDB persistence fix `saveToIndexedDB()` in 0.2.0 reported success but saved nothing, and `loadFromIndexedDB` was an unimplemented stub. Both now work. ### Fixed - **Save is commit-gated.** It resolves only after the IndexedDB transaction commits; errors and aborts (including quota exceeded) reject. The database is stored as one versioned snapshot record, so a save is all-or-nothing. - **`VectorDB.loadFromIndexedDB(name)`** is a static async that returns a `VectorDB`. It rejects when nothing is saved under that name, or the payload is corrupt, an unsupported format, has mismatched dimensions or has duplicate ids. A failed load no longer leaves an empty database behind. - **Naming.** New `setDbName(name)` and `dbName` getter. Names must be 1-128 chars of `[A-Za-z0-9_.-]`. Without `setDbName`, an instance saves under a random name, so choose one if you want to reload in a later session. - The snapshot stores vectors and metadata; the HNSW graph is rebuilt on load. Design and contract: [ADR-200](docs/adr/ADR-200-wasm-indexeddb-persistence-contract.md). ### Install - crates.io: `ruvector-wasm = "2.3.1"` - npm: `npm i @ruvector/wasm@0.2.1` ### Verification - 16 `wasm-bindgen-test` browser tests pass in headless Chrome, including round-trip restore of vectors and search, missing database, invalid names, corrupt JSON, unsupported format and duplicate ids. - A real page saved a database, was reloaded, and loaded it back intact. - A mutation test (removing the write) turns the round-trip test red. ### Known limits - No test forces a transaction abort or quota failure; that path is covered by code review only. - A large database is stored as a single JSON string and the index is rebuilt on load. - The `npm/wasm` TypeScript wrapper was updated to the new API but is a separate package and was not published.
Related Repositories
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io
An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.
Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one