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

ConfigureWebAssembly1.13.3 #37628

Closed
ali2210 opened this issue Mar 3, 2020 · 5 comments
Closed

ConfigureWebAssembly1.13.3 #37628

ali2210 opened this issue Mar 3, 2020 · 5 comments
Labels
arch-wasm WebAssembly issues FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@ali2210
Copy link

ali2210 commented Mar 3, 2020

What version of Go are you using (go version)?

go version go1.13.3 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

amd64

go env Output
$ go env

What did you do?

What did you expect to see?

Hello Assembly on my console

What did you see instead?

LinkError: "import object field 'runtime.nanotime' is not a Function"

Screenshot from 2020-03-03 18-11-29

@dmitshur dmitshur added the arch-wasm WebAssembly issues label Mar 3, 2020
@dmitshur
Copy link
Contributor

dmitshur commented Mar 3, 2020

How did you produce the .wasm file? Did you follow the steps at https://golang.org/wiki/WebAssembly#getting-started or something else?

Which version of wasm_exec.js file are you using?

@dmitshur dmitshur added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 3, 2020
@ali2210
Copy link
Author

ali2210 commented Mar 3, 2020 via email

@dmitshur
Copy link
Contributor

dmitshur commented Mar 3, 2020

So I copy from github.

If you copied it from GitHub, you might have gotten the version from Go 1.14. In your original issue report, you said you were using Go 1.13.3. If that's the case, that could explain the problem you're seeing.

You should ensure you're using a matching version of the Go compiler and the wasm_exec.js.

If you're looking to get help or have more questions about this, I recommend the resources listed at https://golang.org/wiki/Questions. They are better suited for asking questions. We use the issue tracker for tracking bugs in the Go project, so fewer people will be able to answer questions here.

@ali2210
Copy link
Author

ali2210 commented Mar 4, 2020 via email

@agnivade
Copy link
Contributor

The version of wasm_exec.js is tied to the Go repo version. If you are taking wasm_exec.js from Github, you likely have taken from the master branch. That will not be compatible with your installed Go distribution, which is Go 1.13.3.

To get the right wasm_exec.js, you need to get it from $(go env GOROOT)/misc/wasm/wasm_exec.js.

I will close this issue now since this is not a bug. If you still have problems, please feel free to ask your question in any of the forums below:

Thanks

@golang golang locked and limited conversation to collaborators Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly issues FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants