2023-02-26 04:49:10 +00:00
2023-02-22 14:19:56 +00:00
2023-02-26 04:49:10 +00:00
2023-02-26 04:49:10 +00:00
2023-02-26 04:49:10 +00:00
2023-02-26 03:22:08 +00:00
2023-01-26 00:05:52 +00:00
2023-02-24 14:31:41 +00:00
2023-02-22 17:51:30 +00:00
2023-02-23 14:16:37 +00:00
2023-02-25 00:50:03 +00:00
2023-02-26 04:49:10 +00:00
2023-02-22 14:19:56 +00:00
2023-02-22 14:19:56 +00:00
2023-02-25 15:11:07 +00:00
2023-02-25 15:11:07 +00:00
2023-02-18 03:46:52 +00:00
2023-02-20 13:32:52 +00:00
2023-02-20 13:32:52 +00:00
2023-01-11 14:54:42 +00:00
2023-02-10 16:42:49 +00:00
2023-02-14 11:34:24 +00:00
2023-02-26 04:49:10 +00:00
2023-02-24 15:06:19 +00:00
2023-02-25 00:50:03 +00:00
2023-02-22 14:19:56 +00:00
2023-02-24 11:09:30 +00:00
2023-02-26 03:22:08 +00:00
2023-02-23 13:29:51 +00:00
2023-02-23 13:29:51 +00:00
2023-02-23 13:29:51 +00:00
2023-02-21 12:56:39 +00:00
2023-02-23 13:29:51 +00:00
2023-02-23 13:29:51 +00:00
2023-02-23 13:29:51 +00:00

Go bindings to SQLite using Wazero

Go Reference Go Report Go Coverage

⚠️ Work in Progress ⚠️

Go module github.com/ncruces/go-sqlite3 wraps a WASM build of SQLite, and uses wazero to provide cgo-free SQLite bindings.

Caveats

Because WASM does not support shared memory, WAL support is limited.

To work around this limitation, SQLite is compiled with SQLITE_DEFAULT_LOCKING_MODE=1, making EXCLUSIVE the default locking mode. For non-WAL databases, NORMAL locking mode can be activated with PRAGMA locking_mode=NORMAL.

Because connection pooling is incompatible with EXCLUSIVE locking mode, the database/sql driver defaults to NORMAL locking mode, and WAL databases are not supported.

Roadmap

  • build SQLite using zig cc --target=wasm32-wasi
  • :memory: databases
  • port test_demovfs.c to Go
    • branch wasi uses test_demovfs.c directly
  • design a nice API, enough for simple use cases
  • provide a simple database/sql driver
  • file locking, compatible with SQLite on macOS/Linux/Windows
  • advanced SQLite features
    • nested transactions
    • incremental BLOB I/O
    • online backup
    • snapshots
    • session extension
    • resumable bulk update
    • SQL functions
  • custom VFSes

Alternatives

Description
No description provided
Readme MIT 49 MiB
Languages
Go 89.9%
C 5.2%
WebAssembly 3.5%
Shell 1.4%