summaryrefslogtreecommitdiff
path: root/vendor/github.com/tetratelabs/wazero/runtime.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-08-15 00:08:55 +0000
committerLibravatar GitHub <noreply@github.com>2024-08-15 00:08:55 +0000
commit09f24e044653b1327ac1c40f3ab150e3f0184f23 (patch)
tree1d9984d053fa5c8d1203abaa49b8752a1532ff11 /vendor/github.com/tetratelabs/wazero/runtime.go
parentupdate go-fastcopy to v1.1.3 (#3200) (diff)
downloadgotosocial-09f24e044653b1327ac1c40f3ab150e3f0184f23.tar.xz
update go-ffmpreg to v0.2.5 (pulls in latest tetratelabs/wazero) (#3203)
Diffstat (limited to 'vendor/github.com/tetratelabs/wazero/runtime.go')
-rw-r--r--vendor/github.com/tetratelabs/wazero/runtime.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/github.com/tetratelabs/wazero/runtime.go b/vendor/github.com/tetratelabs/wazero/runtime.go
index d1f0a1a31..34742289e 100644
--- a/vendor/github.com/tetratelabs/wazero/runtime.go
+++ b/vendor/github.com/tetratelabs/wazero/runtime.go
@@ -197,7 +197,13 @@ func (r *runtime) Module(moduleName string) api.Module {
if len(moduleName) == 0 {
return nil
}
- return r.store.Module(moduleName)
+ m := r.store.Module(moduleName)
+ if m == nil {
+ return nil
+ } else if m.Source.IsHostModule {
+ return hostModuleInstance{m}
+ }
+ return m
}
// CompileModule implements Runtime.CompileModule