SQLite database library for JavaScript/TypeScript environments that support WASM and WASI, such as Node.js with wasmtime or similar runtimes. Version 0.6.0 provides a synchronous API similar to better-sqlite3, but runs entirely in WebAssembly without native Node.js addons. It includes prepared statements, transactions, and supports BigInt for large integers. The package requires a separate `component.wasm` file that ships with the npm package, making it easy to integrate. Unlike better-sqlite3, it does not depend on native compilation and can run in any WASI-capable runtime. Development is active but early-stage, with regular releases.
npm install sqlite-wasm-wasiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Opens an in-memory database, creates a table, inserts two rows, queries them, and closes the database.
Call stmt.release() when done with a statement, or use db.prepare('sql').run(...) for single-use.Specify a different VFS via options if flock() behavior is needed.
Ensure component.wasm is present in node_modules/sqlite-wasm-wasi/dist/ after install, or copy it to your deployment.
Update your WASI runtime (e.g., wasmtime) to the latest version.
Run npm install sqlite-wasm-wasi
Change to import { open } from 'sqlite-wasm-wasi'Ensure component.wasm exists in node_modules/sqlite-wasm-wasi/dist/ and is the correct version.
No dependency data recorded yet.