Skip to content

Question: Is wasm-opt production ready? #2633

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
Robbepop opened this issue Jan 31, 2020 · 3 comments
Closed

Question: Is wasm-opt production ready? #2633

Robbepop opened this issue Jan 31, 2020 · 3 comments

Comments

@Robbepop
Copy link

This might sound like a super stupid question but I am here to ask if the usage of Binaryen's wasm-opt specifically is production ready?
We have a great deal of motivation to use it to further optimize our Wasm binaries (produced by the Rust compiler mainly) since wasm-opt seems to do a really good job at this. For instance it was capable of reducing the size of an already Rust-optimized Wasm binary from 27kB to roughly 9kB which is nice because it means that we do not have to introduce certain work arounds on the Rust code in order to improve the resulting code quality. However, we are unsure if the optimizations done by wasm-opt are "guaranteed" to not break or slightly change semantics of the optimized code. Of course, this is a declared anti-goal of every optimizer, however, if this is a real constraint for production usage: Would you still recommend Binaryen's wasm-opt for this use-case?

@Robbepop Robbepop changed the title Question: Production Ready? Question: Is wasm-opt production ready? Jan 31, 2020
@MaxGraey
Copy link
Contributor

In my experience it's LLVM do some optimizations stuff which disallow in binaryen due wasm by spec. See this for example: #1911

@kripken
Copy link
Member

kripken commented Jan 31, 2020

@Robbepop

Yes, definitely! Being robust and production-ready is a top priority in wasm-opt. We test it very heavily with our own internal test suite, the emscripten test suite, and using fuzzing. It is used by many people in production (anything using emscripten uses it, for example).

(wasm-opt does have optional optimizations that may change semantics; those would not be turned on by default, of course.)

@kripken
Copy link
Member

kripken commented Feb 22, 2024

This has been answered.

@kripken kripken closed this as completed Feb 22, 2024
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

3 participants