Expand description
WASM bindings for ruvector-verified: proof-carrying vector operations in the browser.
§Quick Start (JavaScript)
import init, { JsProofEnv } from "ruvector-verified-wasm";
await init();
const env = new JsProofEnv();
// Prove dimension equality (~500ns)
const proofId = env.prove_dim_eq(384, 384); // Ok -> proof ID
// Verify a batch of vectors
const vectors = [new Float32Array(384).fill(0.5)];
const result = env.verify_batch(384, vectors);
// Get statistics
console.log(env.stats());
// Create attestation (82 bytes)
const att = env.create_attestation(proofId);
console.log(att.bytes.length); // 82Structs§
- JsProof
Env - Proof environment for the browser. Wraps
ProofEnvironment+ ultra caches.