MoltenDb Web
May 20, 2026 ยท View on GitHub
๐ The Embedded Database for the Modern Web
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.
What's New in v2.0.0
Query Builder
- 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.
Core Engine Performance
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.
Demos
๐ฌ Interactive Query Demo (Core & Query packages)
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.
๐ ฐ๏ธ Angular Demo App
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.
Packages
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 |