2 releases

Uses new Rust 2024

new 0.4.2 Mar 14, 2026
0.4.1 Mar 13, 2026

#1518 in WebAssembly

Apache-2.0

7.5MB
217K SLoC

ReifyDB Webassembly

WebAssembly bindings for ReifyDB, enabling client-side database operations in browsers and Node.js.

Features

  • Browser Native: Run ReifyDB queries entirely in the browser
  • In-Memory: Fast, pure-memory storage using HashMap and BTreeMap
  • Lightweight: ~6 MB compressed bundle
  • Full RQL: Complete ReifyDB Query Language support

Quick Start

Browser (ES Modules)

import init, { WasmDB } from './pkg/web/reifydb_engine_wasm.js';

await init();
const db = new WasmDB();

const results = await db.query(`
  FROM [{ name: "Alice", age: 30 }]
  FILTER age > 25
`);

Node.js

const { WasmDB } = require('./pkg/node/reifydb_engine_wasm.js');

const db = new WasmDB();
// ... use db

Building

Prerequisites

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install wasm-pack
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

# Add WASM target
rustup target add wasm32-unknown-unknown

Build All Targets

./build.sh

This generates:

  • pkg/web/ - Browser with ES modules
  • pkg/node/ - Node.js
  • pkg/bundler/ - Webpack/Vite/etc.

Examples

See the examples/ directory:

  • examples/browser/ - Interactive playground

Documentation

Full API documentation and guides: docs/

License

Apache-2.0

Dependencies

~19–29MB
~458K SLoC