Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我用您的main.go 去编译之后的wasm文件在小程序中报错这个 #4

Open
xiaoxiaohuayu opened this issue Jul 20, 2022 · 1 comment

Comments

@xiaoxiaohuayu
Copy link

initGo LinkError: WebAssembly.instantiate(): Import #5 module="go" function="runtime.walltime" error: function import requires a callable(env: macOS,mp,1.05.2204250; lib: 2.25.0)

@sanyuered
Copy link
Owner

原因:Go官方每次大版本更新时,可能会修改.wasm编译文件和wasm_exec.js文件。本项目使用的Go版本号1.16.3,如果读者使用的另一个Go版本号,比如1.17等,则会出现该错误。
解决方法:要么调整为与本项目相同的版本号,要么按照项目源代码修改不同版本号的wasm_exec.js文件。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants