npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rulake-wasm

v2.3.0-alpha.1

Published

Memory Lake for Agentic AI — WASM build for browsers, Cloudflare Workers, Deno, Bun. Same witness-anchored memory model as `rulake` (Node.js bindings), feature-reduced surface for edge runtimes (no AVX-512, no rayon).

Readme

rulake-wasm — Memory Lake for Agentic AI (WASM, edge)

npm version License: MIT OR Apache-2.0

Witness-anchored vector memory for AI agents — in the browser, in Cloudflare Workers, in Deno, in Bun.

ruLake's edge build. Same SHAKE-256 witness chain that rulake (Rust crate, Python wheel, Node.js binary) uses, compiled to WebAssembly so your edge agent gets the same byte-exact memory guarantees without round-tripping to a server.

Use cases: in-browser RAG, Cloudflare Workers AI memory, Deno Deploy semantic search, Bun-based agent runtimes, on-device personal AI assistants, offline-first agentic apps.

Install

npm install rulake-wasm

Wired as an optionalDependencies peer of rulake per ADR-003 §A: npm consumers on edge platforms get this transparently; consumers on Linux / macOS / Windows get the native binary instead.

Use

Browser (ESM)

<script type="module">
  import init, {
    verifyBundleJson,
    computeWitness,
    searchBruteForceL2,
    buildInfo,
  } from "https://unpkg.com/rulake-wasm/pkg-web/rulake_wasm.js";

  await init();
  console.log(buildInfo());

  // Verify a `table.rulake.json` bundle
  const sidecar = await fetch("/snapshots/memories/table.rulake.json").then(r => r.text());
  const r = verifyBundleJson(sidecar);
  console.log(r.ok ? "verified" : "tampered", r.computed);

  // Brute-force top-K over flat Float32Array (exact L2)
  const vectors = new Float32Array(N * 128);   // your embeddings
  const ids = new Float64Array(N);             // optional u64 ids (BigInt unsupported in TS arrays — pass as f64)
  const query = new Float32Array(128);
  const hits = searchBruteForceL2(vectors, ids, 128, query, 10);
  console.log(hits);  // [{idx, id, score}, ...] sorted ascending
</script>

Cloudflare Workers / Deno / Bun

import init, { verifyBundleJson, searchBruteForceL2 } from "rulake-wasm";
await init();
// same API — verifyBundleJson, computeWitness, searchBruteForceL2, formatVersion, buildInfo

Node.js (fallback when the native binary isn't available)

const { verifyBundleJson, searchBruteForceL2 } = require("rulake-wasm/nodejs");
// no init() needed for the nodejs target — synchronous load

What's in this package

| API | Purpose | |-----|---------| | verifyBundleJson(json) | Parse a table.rulake.json and recompute its witness; returns {ok, computed, stored, fields}. Enforces 64 KiB / 4 KiB DoS caps. | | computeWitness(data_ref, dim, rotation_seed, rerank_factor, generation) | Build a SHAKE-256(32) witness for a candidate bundle. Useful for client-side bundle building. | | searchBruteForceL2(vectors, ids, dim, query, k) | Exact top-K nearest neighbors by squared L2. Recall = 1.0. Caps k ≤ min(n, 4096). ~10 ms at n=50k, D=128 in browser WASM. | | formatVersion() | Bundle format version this build understands (currently 2). | | buildInfo() | "rulake-wasm v2.2.0 (witness-format v2, sha3 = 0.10)". |

The witness output is byte-identical to the host crate's compute_witness (src/bundle.rs). Cross-runtime check: a sidecar produced by Rust ruLake on a server (witness dea58c64…07d7e4) verifies green from this WASM build in the browser.

What's NOT in this package

These need std::sync::Mutex + rayon and are intentionally absent from the edge surface:

  • The full RuLake cache + coherence layer
  • Federated search_federated parallel fan-out
  • Persistence (save_cache_to_dir / warm_from_dir)
  • The BackendAdapter trait (you'd implement this in JS for the edge — v2 follow-up)
  • AVX-512 popcount kernel (no SIMD beyond wasm32 baseline)

For the full surface, use rulake (Node.js native binary) or the Rust crate.

Build from source

git clone --recurse-submodules https://github.com/ruvnet/RuLake
cd RuLake/sdk/node-wasm
rustup target add wasm32-unknown-unknown
cargo install wasm-pack       # if not already installed
./build.sh                     # produces pkg-web/, pkg-nodejs/, pkg-bundler/

The build script unsets RUSTFLAGS because some host setups export -C link-arg=-fuse-ld=mold which the wasm linker rejects.

License

MIT OR Apache-2.0, matching the parent crate.