diff options
author | 2024-08-15 00:30:58 +0000 | |
---|---|---|
committer | 2024-08-15 00:30:58 +0000 | |
commit | 586639ccf0e2fefbd1da2c59d5abcb8d64d37434 (patch) | |
tree | 52a9d7412e98ef406c39f09a6fad6e3fa7a7ad49 /vendor/github.com/ncruces/go-sqlite3/sqlite.go | |
parent | update go-ffmpreg to v0.2.5 (pulls in latest tetratelabs/wazero) (#3203) (diff) | |
download | gotosocial-586639ccf0e2fefbd1da2c59d5abcb8d64d37434.tar.xz |
update go-sqlite3 to v0.18.0 (#3204)
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/sqlite.go')
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/sqlite.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/sqlite.go b/vendor/github.com/ncruces/go-sqlite3/sqlite.go index 61a03652f..712ad5160 100644 --- a/vendor/github.com/ncruces/go-sqlite3/sqlite.go +++ b/vendor/github.com/ncruces/go-sqlite3/sqlite.go @@ -13,6 +13,7 @@ import ( "github.com/ncruces/go-sqlite3/vfs" "github.com/tetratelabs/wazero" "github.com/tetratelabs/wazero/api" + "github.com/tetratelabs/wazero/experimental" ) // Configure SQLite Wasm. @@ -44,12 +45,14 @@ var instance struct { } func compileSQLite() { - if RuntimeConfig == nil { - RuntimeConfig = wazero.NewRuntimeConfig() + ctx := context.Background() + cfg := RuntimeConfig + if cfg == nil { + cfg = wazero.NewRuntimeConfig() } - ctx := context.Background() - instance.runtime = wazero.NewRuntimeWithConfig(ctx, RuntimeConfig) + instance.runtime = wazero.NewRuntimeWithConfig(ctx, + cfg.WithCoreFeatures(api.CoreFeaturesV2|experimental.CoreFeaturesThreads)) env := instance.runtime.NewHostModuleBuilder("env") env = vfs.ExportHostFunctions(env) @@ -82,7 +85,7 @@ type sqlite struct { id [32]*byte mask uint32 } - stack [8]uint64 + stack [9]uint64 freer uint32 } @@ -303,6 +306,7 @@ func exportCallbacks(env wazero.HostModuleBuilder) wazero.HostModuleBuilder { util.ExportFuncVI(env, "go_rollback_hook", rollbackCallback) util.ExportFuncVIIIIJ(env, "go_update_hook", updateCallback) util.ExportFuncIIIII(env, "go_wal_hook", walCallback) + util.ExportFuncIIIII(env, "go_trace", traceCallback) util.ExportFuncIIIIII(env, "go_autovacuum_pages", autoVacuumCallback) util.ExportFuncIIIIIII(env, "go_authorizer", authorizerCallback) util.ExportFuncVIII(env, "go_log", logCallback) |