Componentized SQLite for WebAssembly. The whole SQLite C library compiled to wasm32-wasip2, plus a small set of crates exposing it as WebAssembly Components.
This is the building-block layer. Higher-level applications (notably sqlink, a cli + extension catalog + dot-command surface) consume it as a git submodule.
| Crate | Purpose |
|---|---|
core (sqlite-component-core) |
Rust wrapper around libsqlite3-sys: Connection, Statement, Value, prepared-stmt API. |
sqlite-lib |
wasm component that exports sqlite:extension/spi and friends — drop into any wasm host that wants SQL via composition. |
sqlite-embed |
Static-embed helpers for native Rust extensions (the C-side sqlite3_create_function_v2 glue). |
sqlite-pcache-tvm / sqlite-mem-tvm / sqlite-vfs-tvm / sqlite-tvm-bindings |
Trusted-VM modules: SQLite's pcache / page cache / VFS surfaces exposed as wasm-side providers via compose:dynlink. |
| Path | Source |
|---|---|
sqlite-loader-wit/ |
The WIT contract every extension speaks. Pinned via submodule; lives at https://github.com/tegmentum/sqlite-loader-wit. |
First-time setup (writes per-crate .cargo/config.toml from
.cargo/config.toml.template, with __WASI_SDK_PATH__
substituted):
WASI_SDK_PATH=$HOME/wasi-sdk bash scripts/setup-cargo-config.shThen:
cargo build --release # native (just `core`)
cargo build -p sqlite-lib \
--target wasm32-wasip2 \
--release # the SPI-providing componentExtracted from sqlink
(formerly the sqlite-wasm monorepo) so projects that just
need componentized SQLite don't have to pull in sqlink's cli +
extension catalog. The pre-split history lives in sqlink under
the pre-split tag.
SQLite itself is public domain. The wrapping code in this repo (crates listed above) is MIT.