Replies: 1 comment
-
The limits in wasmparser are intended to match the limits found in other implementations like web browsers, so if it doesn't load in wasmparser it's unlikely to load in other runtimes (or at least that's the intention). Having an opt-in way to not apply limits I think would be reasonable though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I don't expect this to be fixed, and I understand that the Wasm spec allows implementations to have their own limits, but I thought it would be good to document this at least, in case others come across the same issue.
Curently rustc can generate more locals than
wasmparser
supports in debug mode, making it difficult to quickly recompile and debug Wasm apps when using wasm-pack.wasm-pack
useswasm-bindgen-cli
, which useswalrus
for some Wasm transformations (no idea why?), which useswasmparser
to decode the rustc-generated Wasm binaries.Note that binaryen's
wasm-opt
can decode the same file.To repro:
cargo build --lib --target=wasm32-unknown-unknown
wasmparser
You'll see that it hits this line:
wasm-tools/crates/wasmparser/src/readers/core/code.rs
Line 117 in bc0a785
I suspect the function in question is probably a lalrpop-generated code, I can't imagine anything else generating so many locals in debug mode without inlining.
Beta Was this translation helpful? Give feedback.
All reactions