Fun with SQLite and Wasi-Libc
Lightningat Cloud Native Wasm Day Europe 2023 · on Tuesday, 2023-04-18· at 16:50· Hall 7, Room C | Ground Floor | Europe Complex·
summary
Built SQLite for WebAssembly using WASI_SDK and wasi-libc and finds it runs only after adapting to wasi gaps. The wasi-libc mmap implementation won't write back to filesystem and does not return properly aligned memory, causing some databases to be unreadable. Process IDs return fixed values and POSIX is only partially supported. Solution path is: inspect wasi behavior, disable mmap to fall back to SQLite’s safer but slower journaling, or patch callers that require aligned memory; after those changes SQLite works under WASI.
AI-written summary · about
related talks
15mSQLite in Wasm... why and how?
36mSQLite in Wasm: A Glimpse into the Future of Shared Libraries
32mWebAssembly functions for your SQLite-compatible database
33mThe WebAssembly System Interface and Node.js
38mWebAssembly for the backend
45mWALI: A thin Linux kernel interface for WebAssembly
33mWASI and the Cloud: A Game-Changing Duo
33mWASI Networking: Towards a World Wide WebAssembly
