smongo-engine WASM demos

Run a local static server from the parent wasm/ directory (see docker-compose.yml or npm run serve). Open DevTools for logs.

In-memory (main thread)

Memory CRUD smoke test

Loads WASM in the page via smongo-browser.js (in-memory path). No worker, no persistence.

Benchmark

Insert / find / update throughput (in-memory).

OPFS (dedicated worker + sync access handles)

Use Chromium. One tab owns the OPFS sync worker per database name; additional tabs talk to it over BroadcastChannel RPC.

OPFS persistence

Write, read, and wipe stored data. Wipe calls wipeOpfsDatabaseDirectory (closes handles, then removes the OPFS folder).

Multi-tab shared DB

Two tabs: both connect; one is owner, others use RPC. Insert/count from either tab.

Lock handoff

Open here, then Close database (releases lock), then open in another tab.

Automation

Playwright harness

Blank page used by npm run test:e2e; same-origin path as CI.

Build WASM first: wasm-pack build --target web --out-dir wasm/pkg --release from rust/smongo-engine/.