# Support for Binaryen's wasm-opt

**URL:** <https://discuss.moonbitlang.com/t/support-for-binaryens-wasm-opt/209>\
**Category:** Development\
**Created:** [April 21, 2024, 8:56pm UTC](https://discuss.moonbitlang.com/t/support-for-binaryens-wasm-opt/209 "2024-04-21T20:56:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayphelps](https://discuss.moonbitlang.com/letter_avatar_proxy/v4/letter/j/4491bb/32.png) [@jayphelps](https://discuss.moonbitlang.com/u/jayphelps)\
**Post date:** [April 21, 2024, 8:56pm UTC](https://discuss.moonbitlang.com/t/support-for-binaryens-wasm-opt/209/1 "2024-04-21T20:56:03Z")

</div>

Right now binaries created by moonbit utilize the Wasm feature of block / if / loop / try parameters e.g. `(if (result i32) ...)`. While valid Wasm (it came from the multi-value proposal) unfortunately Binaryen’s superb optimization utility wasm-opt [does not yet support this feature](https://github.com/WebAssembly/binaryen/issues/6407), and it’s unclear when it will.

Curious if it would be an easy change to, at least temporarily, avoid that feature? i.e. sometimes you’d have to use locals instead.

---

<div class="post-metadata">

**Author:** ![Yu-zh](https://discuss.moonbitlang.com/user_avatar/discuss.moonbitlang.com/yu-zh/32/90_2.png) [@Yu-zh](https://discuss.moonbitlang.com/u/Yu-zh)\
**Post date:** [April 23, 2024, 2:27am UTC](https://discuss.moonbitlang.com/t/support-for-binaryens-wasm-opt/209/2 "2024-04-23T02:27:56Z")

</div>

Right now we are waiting for Binaryen to support this feature in their tools because our main focus is the language features, build system, and etc. We will add support for emitting third-party-tool-compatible wasm code after our language features are stabilized. Thanks for your interest!
