[WASM] Is there a way to import function from other modules than env?
#4504
-
|
The documentation states this in https://tinygo.org/docs/guides/webassembly/wasm/: // This function is imported from JavaScript, as it doesn't define a body.
// You should define a function named 'add' in the WebAssembly 'env'
// module from JavaScript.
//
//export add
func add(x, y int) intHow would I be able to import a function from a module named differently? I tried |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
You are probably wanting the just added to |
Beta Was this translation helpful? Give feedback.
-
|
Actually this is the PR that adds what you specifically are asking for, I think #4494 |
Beta Was this translation helpful? Give feedback.
You are probably wanting the just added to
devbranch support for//go:wasmexport.Please see #4451 and #4499