Git Product home page Git Product logo

Comments (12)

ashleygwilliams avatar ashleygwilliams commented on May 21, 2024 1

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.

ashleygwilliams avatar ashleygwilliams commented on May 21, 2024 1

@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.

robertohuertasm avatar robertohuertasm commented on May 21, 2024

Same here, both Linux and Windows.

from wasm-pack.

robertohuertasm avatar robertohuertasm commented on May 21, 2024

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.

robertohuertasm avatar robertohuertasm commented on May 21, 2024

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:

image

So just follow the previous instructions 😉

from wasm-pack.

robertohuertasm avatar robertohuertasm commented on May 21, 2024

@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.

thallada avatar thallada commented on May 21, 2024

@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.

ashleygwilliams avatar ashleygwilliams commented on May 21, 2024

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.

robertohuertasm avatar robertohuertasm commented on May 21, 2024

@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:

image

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 jsfile 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.

robertohuertasm avatar robertohuertasm commented on May 21, 2024

@ashleygwilliams you're very welcome! I'm really glad to help. 😉

from wasm-pack.

ashleygwilliams avatar ashleygwilliams commented on May 21, 2024

@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.

robertohuertasm avatar robertohuertasm commented on May 21, 2024

@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 ♥️ what you guys are doing and I'm really interested in learning more about rust and wasm.

from wasm-pack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.