When I compile RustPython to WASM by running npm run dev in the wasm/demo/ folder, the browser returns an error when trying to load the wasm file: Error importing rustpython: CompileError: "wasm validation error: at offset 87562: too many locals"
I'm using Rust 1.42 and Firefox 74.0
The text was updated successfully, but these errors were encountered:
Hmmm, maybe running in dev mode makes it too big to properly process. Does running it in release mode work? npm run dist and then serving from the dist/ directory?
Sorry for the late answer, but you're right, it's looks fine when using a production build. Do you have an idea what might be causing this?
EDIT: For the record, I also tried building with webpack --mode development and serve from there and the problem still occured, so it is not related to webpack-dev-server
I'm able to reproduce it on my computer as well, with firefox. My guess is that llvm doesn't really validate that the wasm functions it codegens are actually legal wasm, at least with regard to the size limit for function bodies.
Seems like it. For my personnal use case, it was about using the wasm module, not developing it, so building in release is a good solution for me. However, I do fear that if the debug build has too large functions, it might be the case for release too if that function becomes larger
When I compile RustPython to WASM by running
npm run devin thewasm/demo/folder, the browser returns an error when trying to load the wasm file:Error importing rustpython: CompileError: "wasm validation error: at offset 87562: too many locals"I'm using Rust 1.42 and Firefox 74.0
The text was updated successfully, but these errors were encountered: