WebAssembly functions for your SQLite-compatible database
summary
libSQL, a fork of SQLite, adds a real CREATE FUNCTION implementation that stores Wasm binaries in an internal table so functions survive restarts and become immediately available across nodes, runs modules via Wasmtime or WasmEdge, and translates types between SQL and Wasm. Rust code compiles to Wasm with libsql_bindgen and automatic ABI translation. The build demonstrates concrete size tricks and tooling to shrink binaries to about 20 KB, supports aggregates and window functions, and runs in-browser and server-mode sqld.
AI-written summary · about
chapters (38)
- 0:00Introduction
- 0:25Background
- 0:40Problem
- 3:11Architecture
- 3:41Userdefined functions
- 3:53Existing userdefined functions
- 5:48C functions
- 6:14SQL functions
- 6:54User defined functions
- 7:48Register functions
- 8:11Calling WebAssembly functions
- 9:44Calling with with parameters
- 9:56Bonus slide
- 10:22Implementation details
- 11:25ABI
- 12:29Type mapping
- 13:06Rust functions
- 13:58Rust playground
- 14:20Bloat
- 15:41Optimization
- 16:24Standard Library
- 17:28Opt
- 18:05Twiggy
- 18:29Top offenders
- 18:59Dominators
- 19:28Twiggy Garbage
- 20:10We Outlook
- 21:14Optimization table
- 21:55Virtual machine
- 22:13Underlying implementations
- 23:10AwesomeEdge support
- 23:54Optimizations
- 25:03Wasm SQL
- 27:16Deployed serverside SQL
- 28:20Open contribution
- 28:40Thanks
- 29:17Performance analysis
- 30:01Why WebAssembly
related talks
15mSQLite in Wasm... why and how?
36mSQLite in Wasm: A Glimpse into the Future of Shared Libraries
13mLightning Talk: Revolutionizing Application Architecture with Wasm Powered Database Ex...
22mWebAssembly beyond the browser
09mFun with SQLite and Wasi-Libc
38mWebAssembly for the backend
59mAn Introduction to WebAssembly
23mWebAssembly for the rest of us
