From 507e4da17b342f5f841acd344137e6f245ac4283 Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Thu, 12 Jan 2023 16:29:57 +0000 Subject: [PATCH] Update README.md --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc74d3a..c3f8d15 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,26 @@ -# go-sqlite -Exploring Go bindings to Sqlite using Wazero +# Go bindings to SQLite using Wazero + +⚠️ DO NOT USE with data you care about. ⚠️ + +This is very much a WIP. + +TODO: +- [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) + - [`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 usefull at all: + - [`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)