wa-sqlite is a WebAssembly build of SQLite that enables developers to run a fully functional relational database engine inside web browsers or other JavaScript environments. Unlike traditional SQLite builds, this project emphasizes extensibility by allowing developers to implement custom virtual file systems entirely in JavaScript, which enables flexible storage backends such as IndexedDB or the Origin Private File System. This design allows applications to persist data locally in a browser while maintaining the familiar SQL interface and behavior of SQLite. The project supports both synchronous and asynchronous execution models, accommodating different performance and architectural needs, including asynchronous APIs required for certain browser storage systems. It also includes example implementations of various storage strategies, demonstrating how developers can tailor persistence mechanisms for specific use cases.
Features
- SQLite compiled to WebAssembly for browser execution
- Custom virtual file systems implemented in JavaScript
- Support for IndexedDB and Origin Private File System storage
- Synchronous and asynchronous execution modes
- Extensible architecture for custom database behavior
- Near-native performance within web environments