tinygo-site icon indicating copy to clipboard operation
tinygo-site copied to clipboard

Document `//export` requirement

Open aykevl opened this issue 3 years ago • 1 comments
trafficstars

The page here says the following:

// This function is imported from JavaScript, as it doesn't define a body.
// You should define a function named 'main.add' in the WebAssembly 'env'
// module from JavaScript.
func add(x, y int) int

That's outdated, and needs to be updated.

aykevl avatar Oct 27 '22 13:10 aykevl

@aykevl thanks for pointing this out ! really interested in the correct procedure, it should be done using syscall/js ?

alvarolm avatar Oct 30 '22 19:10 alvarolm