This is the monorepo for MoltenDb Web — a high-performance Rust engine compiled to WASM with persistent storage via OPFS.
Use it as a full-featured embedded database or as a persistent state manager — your app's data survives page reloads, browser crashes, and unexpected connection loss automatically.
- Bulk Delete with
.where()— delete documents matching a filter clause without listing individual keys. - Capped Collections (
.maxSize()) — cap a collection to a maximum number of documents; oldest entries are evicted automatically when the limit is reached. - TTL Collections (
.ttl()) — set a time-to-live (in seconds) on a collection; documents are removed automatically after expiry.
Arc<str>collection-key interning — the outerDashMapkey was changed fromStringtoArc<str>. During bulk insert and WAL replay all documents in the same collection share a single pointer instead of allocating a newStringper document. Saves ~30 B per doc (~30 MB at 1 M docs) and reduces allocator pressure during startup.- MessagePack in-memory storage — the hot document map was switched from
serde_json::ValuetoBox<[u8]>( MessagePack bytes). Reduces steady-state RSS for 1 M docs from ~4 GB to ~500 MB (~8× lower). Decoding toValuehappens lazily on read; write paths encode viarmp_serde.
Explore the full MoltenDb query builder in a live, zero-setup environment:
- ⚡ **StackBlitz: ** Open Interactive Demo
This demo lets you test the full query builder API — get(), set(), update(), delete(), .where(), .fields(),
.sort(), .joins(), and more — directly in the browser against a real WASM-powered MoltenDb instance.
A real-world Angular application showcasing the @moltendb-web/angular integration:
- 🔗 Demo repo: github.com/maximilian27/moltendb-angular
- ⚡ StackBlitz: Open in StackBlitz
- 🌐 **Live demo: ** moltendb-angular.maximilian-both27.workers.dev/laptops
The demo app showcases two real-world scenarios:
/laptops— A fully-featured data table with filtering, sorting, column visibility, field projection, and reactive summary stats usingmoltenDbResource./stress-test— A benchmarking page measuring MoltenDB CRUD performance (bulk writes, reads, filtered/sorted queries, updates, and deletes) displayed as ops/sec.
This monorepo contains the following packages. Please refer to their individual READMEs for detailed documentation, usage examples, and API references.
| Package | Description | README |
|---|---|---|
@moltendb-web/core |
Core WASM engine — low-level database bindings | README |
@moltendb-web/query |
Query builder — ergonomic API on top of core | README |
@moltendb-web/angular |
Angular integration — reactive Signals, resources, and DI | README |
@moltendb-web/react |
React integration — React hooks | README |