summaryrefslogtreecommitdiff
path: root/vendor/github.com/tetratelabs/wazero/api/wasm.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/api/wasm.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/api/wasm.go')
-rw-r--r--vendor/github.com/tetratelabs/wazero/api/wasm.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/github.com/tetratelabs/wazero/api/wasm.go b/vendor/github.com/tetratelabs/wazero/api/wasm.go
index c66b582fa..d99c1a756 100644
--- a/vendor/github.com/tetratelabs/wazero/api/wasm.go
+++ b/vendor/github.com/tetratelabs/wazero/api/wasm.go
@@ -151,9 +151,13 @@ type Module interface {
// ExportedFunction returns a function exported from this module or nil if it wasn't.
//
- // Note: The default wazero.ModuleConfig attempts to invoke `_start`, which
- // in rare cases can close the module. When in doubt, check IsClosed prior
- // to invoking a function export after instantiation.
+ // # Notes
+ // - The default wazero.ModuleConfig attempts to invoke `_start`, which
+ // in rare cases can close the module. When in doubt, check IsClosed prior
+ // to invoking a function export after instantiation.
+ // - The semantics of host functions assumes the existence of an "importing module" because, for example, the host function needs access to
+ // the memory of the importing module. Therefore, direct use of ExportedFunction is forbidden for host modules.
+ // Practically speaking, it is usually meaningless to directly call a host function from Go code as it is already somewhere in Go code.
ExportedFunction(name string) Function
// ExportedFunctionDefinitions returns all the exported function