Skip to content

Consider using wasm-bindgen-cli directly #13

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

Closed
domoritz opened this issue Feb 11, 2021 · 3 comments
Closed

Consider using wasm-bindgen-cli directly #13

domoritz opened this issue Feb 11, 2021 · 3 comments

Comments

@domoritz
Copy link
Contributor

https://github.com/rustwasm/wasm-pack hasn't been updated in a while and there are a number of important features missing. Maybe I am missing something but I wonder what value wasm pack brings over wasm-bindgen-cli.

@Pauan
Copy link
Collaborator

Pauan commented Feb 11, 2021

wasm-pack does a few important things:

  • It automatically installs the wasm32-unknown-unknown target.
  • It parses the Cargo.lock and downloads a version of wasm-bindgen-cli which exactly matches your project's version of wasm-bindgen. This is super important, the versions must match exactly.
  • It downloads and runs wasm-opt, which produces smaller binaries.

And it's available via an npm package, so it is automatically downloaded and used (without the user needing to manually install wasm-bindgen-cli separately).

I am aware of the state of wasm-pack (I used to be a Wasm Core team member, and I have heavily contributed to Rust Wasm), and I am prepared to create a replacement for wasm-pack if it ever breaks.

There has been talk about integrating wasm-pack's features into wasm-bindgen-cli:

rustwasm/wasm-bindgen#1674

But I don't contribute to Rust anymore, and Alex hasn't been very active lately, so I wouldn't expect it to happen anytime soon.

@domoritz
Copy link
Contributor Author

Thank you for the background and linking to the wasm bindgen issue. That's really helpful to understand. rustwasm/wasm-bindgen#1674 is pointing in a good direction from a user perspective.

Feel free to close this issue as it seems like the general tooling needs to improve rather than this particular rollup plugin.

@domoritz
Copy link
Contributor Author

Closing since improvements are better made at the source so everyone benefits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants