[BUG] app deploy throws 'failed to compile Webassembly module'

app deploy throws an error when an app bundle contains a Shopify function that uses the latest stable Rust version:

This error does no occur on v1.81.0, but does occur on v1.83.0, and I imagine the real error is being hidden by the generic ‘failed to compile’.

Hi Bkspace,

Our team are investigating this issue - I’ll update here when I have more info.

1 Like

@Liam-Shopify - Thanks, have figured out this issue after discussing with @NickWesselman!

It’s my understanding that a function’s WASM must be run through wasm-opt, and by using the latest wasip1 target, wasm-opt is not run automatically.

The short term fix is to manually run compiled wasm through wasm-opt. Nick mentioned that this may be done automatically for you in a future CLI release.