summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/sqlite.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-01-14 18:30:55 +0000
committerLibravatar GitHub <noreply@github.com>2025-01-14 18:30:55 +0000
commit81b66ad7e324dda72abc293433ecdaf4cf55c3a6 (patch)
tree7c2e1133ee2e5c6111d17be4937368f58115afe4 /vendor/github.com/ncruces/go-sqlite3/sqlite.go
parentbump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645) (diff)
downloadgotosocial-81b66ad7e324dda72abc293433ecdaf4cf55c3a6.tar.xz
update ncruces/go-sqlite3 v0.21.3 -> v0.22.0, gruf/go-ffmpreg v0.6.4 -> v0.6.5 (#3646)
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/sqlite.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/sqlite.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/sqlite.go b/vendor/github.com/ncruces/go-sqlite3/sqlite.go
index 18a2c2a73..18f8241df 100644
--- a/vendor/github.com/ncruces/go-sqlite3/sqlite.go
+++ b/vendor/github.com/ncruces/go-sqlite3/sqlite.go
@@ -11,7 +11,6 @@ import (
"github.com/tetratelabs/wazero"
"github.com/tetratelabs/wazero/api"
- "github.com/tetratelabs/wazero/experimental"
"github.com/ncruces/go-sqlite3/internal/util"
"github.com/ncruces/go-sqlite3/vfs"
@@ -49,14 +48,18 @@ func compileSQLite() {
ctx := context.Background()
cfg := RuntimeConfig
if cfg == nil {
- cfg = wazero.NewRuntimeConfig()
- if bits.UintSize >= 64 {
- cfg = cfg.WithMemoryLimitPages(4096) // 256MB
+ if util.CompilerSupported() {
+ cfg = wazero.NewRuntimeConfigCompiler()
} else {
+ cfg = wazero.NewRuntimeConfigInterpreter()
+ }
+ if bits.UintSize < 64 {
cfg = cfg.WithMemoryLimitPages(512) // 32MB
+ } else {
+ cfg = cfg.WithMemoryLimitPages(4096) // 256MB
}
}
- cfg = cfg.WithCoreFeatures(api.CoreFeaturesV2 | experimental.CoreFeaturesThreads)
+ cfg = cfg.WithCoreFeatures(api.CoreFeaturesV2)
instance.runtime = wazero.NewRuntimeWithConfig(ctx, cfg)