Summary
Design a first-class JavaScript/TypeScript WASM embedding surface for ordvec.
This is an ecosystem compatibility issue. The core crate already targets wasm32, but browser and Node users need a clear package/API contract. ordvec should expose scoring primitives without owning application storage, metadata, or database lifecycle.
Proposed scope
Create a design and initial package plan for an ordvec-wasm surface, likely with wasm-bindgen or equivalent. Start with read-only primitives:
- load/probe persisted
RankQuant, Bitmap, and SignBitmap where practical
Float32Array query inputs
Uint32Array candidate/docset inputs
- full search and subset rerank
- explicit
free()/lifetime rules
- TypeScript declarations
- Worker/browser/Node examples
Index building can be staged later and should align with Rust/C builder work.
Acceptance criteria
- Design doc states package name, supported runtimes, memory/lifetime model, and API shape.
- Node and headless-browser smoke tests run a fixture search.
- TypeScript declarations ship with the package when implemented.
- Docs make clear that storage, metadata, filters, and sync remain host responsibilities.
- Uses runtime feature guidance for wasm SIMD where relevant.
Non-goals
- No browser vector database.
- No IndexedDB/OPFS storage layer by default.
- No app framework or hosted service.
Summary
Design a first-class JavaScript/TypeScript WASM embedding surface for ordvec.
This is an ecosystem compatibility issue. The core crate already targets
wasm32, but browser and Node users need a clear package/API contract. ordvec should expose scoring primitives without owning application storage, metadata, or database lifecycle.Proposed scope
Create a design and initial package plan for an
ordvec-wasmsurface, likely withwasm-bindgenor equivalent. Start with read-only primitives:RankQuant,Bitmap, andSignBitmapwhere practicalFloat32Arrayquery inputsUint32Arraycandidate/docset inputsfree()/lifetime rulesIndex building can be staged later and should align with Rust/C builder work.
Acceptance criteria
Non-goals