DEV Community

Discussion on: (Tiny)Go to WebAssembly

Collapse
timonweb profile image
Tim Kamanin 🚀

tinygo bundle sizes look very promising, however didn't work for me. After compiling to main.wasm with tinygo I get the following error in Chrome console: 'Import #0 module="env" error: module is not an object or function'. What could be wrong here?

Collapse
sendilkumarn profile image
Sendil Kumar Author • Edited on

Ahh.. sorry I have to update it. Can you pull the wasm_exec.js from the tinygo repo instead of the attached file

Updated the post

Collapse
timonweb profile image
Tim Kamanin 🚀

It's working, thanks a lot for such a quick response! Btw, are there any limitations imposed by tinygo? Is it capable to compile any Go code to .wasm?

Thread Thread
sendilkumarn profile image
Sendil Kumar Author

Yeah there are some limitations. I am drafting a post on that. I am also experimenting a bit. Sooner will have a complete list.