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

wasm2js example not working #2735

Closed
nklhtv opened this issue Dec 8, 2021 · 0 comments · Fixed by #2837
Closed

wasm2js example not working #2735

nklhtv opened this issue Dec 8, 2021 · 0 comments · Fixed by #2837
Labels

Comments

@nklhtv
Copy link

nklhtv commented Dec 8, 2021

Describe the Bug

After successfully compiling and running the wasm2js example in Chrome, theres an error message in the console, instead of the log from rust.
In this comment @alexcrichton says it should not work with --target web but in #1750 adds this flag to the build step. Maybe thats what causes the issue and should be changed again?

Related to #2428 #1743 #1750


Also, the View compiled example online link in the wasm2js readme is not working.

Steps to Reproduce

  1. cd /examples/wasm2js
  2. ./build.sh
  3. open http://127.0.0.1:8080/

Expected Behavior

to log "Hello, World!" in the console

Actual Behavior

throws an error

Uncaught (in promise) CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 69 6d 70 6f @+0
async function (async) |   |  
-- | -- | --
  | init | @ | wasm2js.js:72
  | (anonymous) | @ | index.js:4

Additional Context

rustc 1.47.0
wasm-pack 0.9.1

@nklhtv nklhtv added the bug label Dec 8, 2021
This was referenced Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant