diff --git a/README.md b/README.md index 31a4e93..22ff781 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,7 @@ Roadmap: - branch [`wasi`](https://github.com/ncruces/go-sqlite3/tree/wasi) uses `test_demovfs.c` directly - [x] design a simple, nice API, enough for simple use cases - [x] provide a simple `database/sql` driver -- [x] file locking, compatible with SQLite on Windows/Unix -- [ ] shared memory, compatible with SQLite on Windows/Unix - - needed for improved WAL mode +- [x] file locking, compatible with SQLite on macOS/Linux/Windows - [ ] advanced SQLite features - [ ] nested transactions - [ ] incremental BLOB I/O diff --git a/compile.go b/compile.go index 9f2d10b..45991c7 100644 --- a/compile.go +++ b/compile.go @@ -2,7 +2,9 @@ package sqlite3 import ( "context" + "crypto/rand" "os" + "runtime" "strconv" "sync" "sync/atomic" @@ -34,7 +36,10 @@ func (s *sqlite3Runtime) instantiateModule(ctx context.Context) (api.Module, err } cfg := wazero.NewModuleConfig(). - WithName("sqlite3-" + strconv.FormatUint(s.instances.Add(1), 10)) + WithName("sqlite3-" + strconv.FormatUint(s.instances.Add(1), 10)). + WithSysWalltime().WithSysNanotime().WithSysNanosleep(). + WithOsyield(runtime.Gosched). + WithRandSource(rand.Reader) return s.runtime.InstantiateModule(ctx, s.compiled, cfg) }