[WASM] Is there a way to import function from other modules than env?
#4504
Answered
by
deadprogram
roblillack
asked this question in
Q&A
-
|
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.
Answered by
deadprogram
Oct 9, 2024
Replies: 2 comments 1 reply
-
|
You are probably wanting the just added to |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
roblillack
-
|
Actually this is the PR that adds what you specifically are asking for, I think #4494 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are probably wanting the just added to
devbranch support for//go:wasmexport.Please see #4451 and #4499