npm install @sqlite.org/sqlite-wasm
sqlite3 WebAssembly & JavaScript Documentation IndexSQLite Wasm in the browser backed by the Origin Private File System | Blog | Chrome for DevelopersSQLite is a popular, open-source, lightweight, embedded relational database management system. Many developers use it to store data in a structured, easy-to-use manner. Because of its small size and low memory requirements, SQLite is often leveraged as a database engine in mobile devices, desktop applications, and web browsers.
There are a number of unofficial SQLite versions based on Web Assembly (Wasm), allowing it to be used in web browsers, for example, sql.js. The sqlite3 WASM/JS subproject is the first effort that is officially associated with the SQLite project making Wasm builds of the library established members of the family of supported SQLite deliverables.
The Origin Private File System (OPFS, part of the File System Access API) is augmented with a special surface that brings very performant access to data. This new surface differs from existing ones by offering in-place and exclusive write access to a file's content.
Wasm By Example
WebAssembly (Wasm) is an universal low level bytecode that runs on the web. It is a compilation target for languages like Rust, AssemblyScript (Typescript-like), Emscripten (C/C++), and much more! Wasm offer a compact binary format with predictable performance, and portability to run alongside Javascript and other host languages. Wasm is currently shipped in all major browsers, and has runtimes meant for running on servers or interfacing with systems using WASI.