2023-03-01 10:34:39 +00:00
2023-02-22 14:19:56 +00:00
2023-02-28 16:03:31 +00:00
2023-02-28 16:02:13 +00:00
2023-02-26 04:49:10 +00:00
2023-03-01 10:34:39 +00:00
2023-02-28 16:02:13 +00:00
2023-02-27 03:20:23 +00:00
2023-03-01 10:34:39 +00:00
2023-03-01 10:34:39 +00:00
2023-02-27 03:20:23 +00:00
2023-03-01 10:34:39 +00:00
2023-02-22 14:19:56 +00:00
2023-02-27 03:20:23 +00:00
2023-03-01 10:34:39 +00:00
2023-02-27 12:07:48 +00:00
2023-03-01 10:34:39 +00:00
2023-03-01 10:34:39 +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-27 03:20:23 +00:00
2023-02-27 03:20:23 +00:00
2023-02-28 16:02:13 +00:00
2023-02-24 15:06:19 +00:00
2023-03-01 10:34:39 +00:00
2023-02-22 14:19:56 +00:00
2023-03-01 10:34:39 +00:00
2023-03-01 10:34: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
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-27 03:20:23 +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
    • shared cache mode
  • custom 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%