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

Add option to skip optimization with wasm-opt #1321

Merged
merged 1 commit into from
Mar 16, 2024
Merged

Add option to skip optimization with wasm-opt #1321

merged 1 commit into from
Mar 16, 2024

Conversation

sisou
Copy link
Contributor

@sisou sisou commented Aug 10, 2023

I am currently running wasm-pack three times for our project. Once for the main-thread wasm file, once for the web-worker wasm file, and once to generate types that include both of those builds.

This --no-opt option would help me immensely by reducing our build time by ~30% by not having to wait for the wasm-opt step for the type generation. I cannot disable wasm-opt generally in Cargo.toml, because I still want it for the other two actual build steps.

An alternative to this PR would be a --types-only option, which only outputs a .d.ts file.

  • You have the latest version of rustfmt installed
  • You ran cargo fmt on the code base before submitting
  • You reference which issue is being closed in the PR text

✨✨ 😄 Thanks so much for contributing to wasm-pack! 😄 ✨✨

Copy link
Member

@drager drager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@drager drager merged commit abc6078 into rustwasm:master Mar 16, 2024
5 checks passed
@sisou sisou deleted the sisou/no-opt branch March 16, 2024 15:46
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

Successfully merging this pull request may close these issues.

2 participants