| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-10-06 | 1.9 kB | |
| ruvector-wasm 2.3.1 -- IndexedDB persistence fix source code.tar.gz | 2026-10-06 | 124.5 MB | |
| ruvector-wasm 2.3.1 -- IndexedDB persistence fix source code.zip | 2026-10-06 | 133.0 MB | |
| Totals: 3 Items | 257.6 MB | 0 | |
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 aVectorDB. 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)anddbNamegetter. Names must be 1-128 chars of[A-Za-z0-9_.-]. WithoutsetDbName, 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.
Install
- crates.io:
ruvector-wasm = "2.3.1" - npm:
npm i @ruvector/wasm@0.2.1
Verification
- 16
wasm-bindgen-testbrowser 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/wasmTypeScript wrapper was updated to the new API but is a separate package and was not published.