Totally not important. Just wanted to mention the 135MB target/wasm32-wasip1/debug/wasmtime.wasm that is built from cargo build --target wasm32-wasip1 --features all-arch,compile --no-default-features
fails the wasm-tools validate
command.
$ wasm-tools validate target/wasm32-wasip1/debug/wasmtime.wasm
error: func 34969 failed to validate
Caused by:
0: too many locals: locals exceed maximum (at offset 0x11e3568)
The wasm binary built with --release passes.
That’s unfortunately common in large programs built with llvm without optimizations. Does the release build work?
The limit on locals (50k) should be consistent across all wasm implementations https://github.com/WebAssembly/spec/issues/607
The release build passes validation and that's what I'm playing with, so far with iwasm
on a Linux machine. I don't imagine I'll need the debug version as I would hope to not be debugging the compiler. If I ever need it, I'll try to remember this thread and look into passing LLVM flags to the build to reduce things. Thanks.
Frank Rehwinkel has marked this topic as resolved.
Last updated: Dec 23 2024 at 14:03 UTC