wasm-pack
wasm-pack copied to clipboard
locals exceed maximum error with wasm-pack on big match
🐛 Bug description
Compiling oxigraph JS with wasm-pack
fails with the following error:
error: failed to parse input file as wasm
Caused by:
locals exceed maximum (at offset 10564186)
Here is a failing CI build and a working CI build from earlier the same day Both builds use wasm-pack 1.9.1 and Rust 1.50 stable.
This error is caused by the big match
introduced in quick-xml
0.21.
🤔 Expected Behavior
Proper compilation
👟 Steps to reproduce
git clone https://github.com/oxigraph/oxigraph
cd oxigraph/js
wasm-pack build --dev --target nodejs
🌍 Your environment
Include the relevant details of your environment. wasm-pack version: 0.9.1 rustc version: 1.50
I have the same problem, is there a quick fix patch
It seems that too many temporary variables are generated, the limit is at: https://github.com/bytecodealliance/wasm-tools/blob/b5c3d98e40590512a3b12470ef358d5c7b983b15/crates/wasmparser/src/limits.rs#L29
Maybe this upper limit is fully considered, which too many variables caused by excessive inline.