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 not working? #1743

Closed
spease opened this issue Aug 29, 2019 · 1 comment · Fixed by #1750
Closed

wasm2js not working? #1743

spease opened this issue Aug 29, 2019 · 1 comment · Fixed by #1750
Labels

Comments

@spease
Copy link

spease commented Aug 29, 2019

When following the instructions for wasm2js (https://rustwasm.github.io/wasm-bindgen/examples/wasm2js.html) it appears the JS glue code generated by wasm-pack still retains the old .wasm filename. I also had to update package.json to replace .wasm . Even doing this my local www server still remained nonfunctional (no evidence of execution).

I didn’t spend much time on this as the larger project was more of a proof-of-concept as to what order of magnitude effort would be required to compile backend code for frontend.

My next try would probably be to look at the generated js to see if the glue code is still necessary. I suspect I should have pointed my test server directly to the wasm2js output (this would still require changing package.json though)

That being said, I suspect I may have been doing something wrong since neither of the above steps were mentioned in the manual, and it seems like IE10 compatibility is something someone would have looked into before now.

@spease spease added the bug label Aug 29, 2019
alexcrichton added a commit to alexcrichton/wasm-bindgen that referenced this issue Sep 3, 2019
This needed and update now that we're explicitly importing `*.wasm` to
import `*.js` instead. Additionally this was moved over to the `web`
target to avoid needing Webpack

Closes rustwasm#1743
@alexcrichton
Copy link
Contributor

I think this largely just needed to update the import path as well which is being fixed in #1750, and that should do the trick!

alexcrichton added a commit that referenced this issue Sep 3, 2019
This needed and update now that we're explicitly importing `*.wasm` to
import `*.js` instead. Additionally this was moved over to the `web`
target to avoid needing Webpack

Closes #1743
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.

2 participants