Comments (12)
oh iiiiiiinteresting. thank you so much for trying this out @robertohuertasm and for providing such a good detailed report. i don't think that the wasm should be referring to the js at all but i'm gonna dive into that now and see what's up!
from wasm-pack.
@robertohuertasm ok, i misspoke, the wasm aboslutely refers to the js and i cannot and should not rename it. i'll need to revert that! thanks for noting it!
from wasm-pack.
Same here, both Linux and Windows.
from wasm-pack.
I installed wasm-bindgen
globally and then it worked. It seems that this step is missing in the tutorial: cargo install wasm-bindgen-cli
.
from wasm-pack.
Looking into the code it seems that wasm-pack
should install wasm-bindgen
and, indeed, it does but for some reason there's a mismatch in the versions (I guess next version will fix this).
It seems that this is a known issue:
So just follow the previous instructions 😉
from wasm-pack.
@ashleygwilliams, I'm thinking that maybe it would be nice to leverage the verbose
flag so we could get the stdout
from the wasm-bindgen
process. I guess we could add this option here and we could also make this option explicit to the user at the end of any process so she can have a tool to directly use in case things didn't work as expected (as for instance happened to @thallada and myself).
EDIT: I can see that this is already planned in issue #50
from wasm-pack.
@robertohuertasm thanks for the tip. cargo install -f wasm-bindgen-cli
fixed it for me.
I did use wasm-pack
's -v
verbose flag, but that didn't print the error. So I think getting that to show the errors from wasm-bindgen
would be really helpful.
from wasm-pack.
hey all! sorry you ran into this trouble. so we have an 0.2.0 coming out, likely today that should fix this issue. we were definitely irresponsibly eating up stderr but that should be fixed! if you'd like to test it out before we release, you can run cargo install --git https://github.com/ashleygwilliams/wasm-pack.git
to install this tool from master. we additionally plan on having some much nicer logs but what is currently on master should ideally solve this for you! do let me know and thanks for filing!
from wasm-pack.
@ashleygwilliams , I did try a clean install directly from the github repo and it works as expected.
Unfortunately, I think I've found another issue with the resulting js
file being renamed to index.js
. Whenever I try to test it I get this error:
If I change the name of index.js
to wasm-test
and change the main
entry in package.json
accordingly then it all works flawlessly.
I've not had time to look carefully into it but it seems that the associated .wasm
file refers to the js
file by its old name. Does it make any sense?
I'll take a look again later to see what I can find.
from wasm-pack.
@ashleygwilliams you're very welcome! I'm really glad to help. 😉
from wasm-pack.
@robertohuertasm #105 should have fixed the issue for ya! :) hoping to cut a 0.2.0 release today! thanks again for all your help! let me know if you are interested in contributing at any point! we'd love to have you
from wasm-pack.
@ashleygwilliams, it's awesome hearing about the 0.2.0 release! 😀
I've taken a look at #105. I feel a little bit curious about this "circular" reference between the js
and the wasm
file. I had the intention to study a little bit the wasm-bindgen
repo to gain some insight on this matter but maybe you can point me out to the proper resource. 😉
On the other hand, regarding my interest in contributing, I'd be really happy to provide my help or assistance. I really rust
and wasm
.
from wasm-pack.
Related Issues (20)
- Found invalid metadata `core` `compiler_builtins` HOT 1
- Add an option to --keep-debug HOT 2
- wasm build failed because of rimage HOT 1
- Allow specifying url(s) for interactive browsers tests
- NPM Package Fails to Install on Mingw
- `wasm-pack test --headless --chrome` fails in docker container HOT 2
- Wasm-opt endless loop
- `wasm-pack` doesn't default-export the init function in .d.ts file HOT 1
- npm reports warnings in generated `package.json` file
- Support msys2 environment
- Please update the ring crate to 17.x HOT 2
- `wasm32-unknown-unknown` target not found HOT 2
- `cargo install wasm-pack --version 0.12.1` fails on MacOS HOT 4
- Unknown option '-0z' HOT 1
- Unable to pack/publish when out-dir option is used for build
- 'wasm-pack build' fails because of 'error: could not compile `crossterm` (lib)' HOT 1
- `build --release` should generate JS without white-space HOT 1
- --verbose should print cargo command
- Please update the npm package HOT 1
- yarn build-wasm errors with `Unknown system error -86`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasm-pack.