Skip to content

Add option to skip optimization with wasm-opt#1321

Merged
drager merged 1 commit intodrager:masterfrom
sisou:sisou/no-opt
Mar 16, 2024
Merged

Add option to skip optimization with wasm-opt#1321
drager merged 1 commit intodrager:masterfrom
sisou:sisou/no-opt

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
Owner

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

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