mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-30 20:43:38 +00:00
- Fix WASM glue: detect Node.js properly instead of relying on fetch() (fetch on file:// URLs fails in Node.js 18-21) - Support both CJS require() and ESM import via exports map - Add .mjs ESM wrapper for dual-format support - Remove "type": "module" for CJS compatibility - Bump rvf-wasm to 0.1.5 - Add build-rvf-node.yml CI workflow for cross-platform NAPI builds (linux-x64-gnu, linux-arm64-gnu, darwin-x64, darwin-arm64, win32-x64-msvc) - Fix wasm-dedup-check CI: use --ignore-scripts --omit=optional to avoid EBADPLATFORM errors from platform-specific workspace packages Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|---|---|---|
| .. | ||
| pkg | ||
| package.json | ||
| README.md | ||
@ruvector/rvf-wasm
RuVector Format (RVF) WASM build for browsers and edge functions. Query vectors directly in the browser with zero backend.
Install
npm install @ruvector/rvf-wasm
Usage
<script type="module">
import init, { WasmRvfStore } from '@ruvector/rvf-wasm';
await init();
const store = WasmRvfStore.create(384);
store.ingest(1, new Float32Array(384));
const results = store.query(new Float32Array(384), 10);
console.log(results); // [{ id, distance }]
</script>
Features
- ~46 KB control plane (full store API)
- ~5.5 KB tile microkernel (query-only)
- In-memory store with HNSW indexing
- Segment inspection and status
- No backend required
License
MIT