The @surrealdb/wasm package is a plugin for the JavaScript SDK that runs SurrealDB as an embedded database within a browser environment. It supports in-memory databases and persistent storage via IndexedDB, and can optionally run inside a Web Worker.
Important
Installation
First, install the JavaScript SDK if you haven't already. Then add the WASM engine:
Quick start
For a complete guide covering engine registration, supported protocols (mem://, indxdb://), Web Worker support, and bundler configuration, see the WebAssembly concept page.
Learn more
WebAssembly concept page for detailed setup, Web Worker support, and bundler configuration
Connecting to SurrealDB for connection options and reconnection behavior