mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
32 lines
1.5 KiB
Markdown
32 lines
1.5 KiB
Markdown
# Go bindings to SQLite using Wazero
|
|
|
|
⚠️ DO NOT USE with data you care about. ⚠️
|
|
|
|
This is very much a WIP.
|
|
|
|
Roadmap:
|
|
- [x] build SQLite using `zig cc --target=wasm32-wasi`
|
|
- [x] `:memory:` databases
|
|
- [x] use [`test_demovfs.c`](sqlite3/test_demovfs.c) for file databases
|
|
- [ ] come up with a simple, nice API:
|
|
- idiomatic Go, close to the C SQLite API:
|
|
- [`github.com/bvinc/go-sqlite-lite`](https://github.com/bvinc/go-sqlite-lite)
|
|
- [`github.com/crawshaw/sqlite`](https://github.com/crawshaw/sqlite)
|
|
- [`github.com/zombiezen/go-sqlite`](https://github.com/zombiezen/go-sqlite)
|
|
- [`github.com/cvilsmeier/sqinn-go`](https://github.com/cvilsmeier/sqinn-go)
|
|
- [`database/sql`](https://pkg.go.dev/database/sql) drivers can come later, if ever
|
|
- [ ] implement own VFS to sidestep WASI syscalls:
|
|
- locking will be a pain point:
|
|
- WASM has no threads
|
|
- concurrency is achieved by instantiating the module repeatedly
|
|
- file access needs to be synchronized, both in-process and out-of-process
|
|
- out-of-process should be compatible with SQLite on Windows/Unix
|
|
- [ ] benchmark to see if this is useful at all:
|
|
- [`github.com/cvilsmeier/sqinn-go`](https://github.com/cvilsmeier/sqinn-go-bench)
|
|
- [`github.com/bvinc/go-sqlite-lite`](https://github.com/bvinc/go-sqlite-lite)
|
|
- [`github.com/mattn/go-sqlite3`](https://github.com/mattn/go-sqlite3)
|
|
- [`modernc.org/sqlite`](https://modernc.org/sqlite)
|
|
|
|
Random TODO list:
|
|
- optimize small allocations that last a single function call;
|
|
- … |