-
Notifications
You must be signed in to change notification settings - Fork 458
Open
Description
wasm-pack build
works, but wasm-pack --dev
and wasm-pack --debug
fail with:
...
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s
[INFO]: ⬇️ Installing wasm-bindgen...
error: failed getting Wasm module for '/home/omer/fir/fir/target/wasm32-unknown-unknown/debug/fir.wasm'
Caused by:
0: failed to parse input as wasm
1: failed to parse code section
2: locals exceed maximum (at offset 3772351)
Stack backtrace:
0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
1: walrus::module::Module::parse
2: walrus::module::config::ModuleConfig::parse
3: wasm_bindgen_cli_support::Bindgen::generate_output
4: wasm_bindgen_cli_support::Bindgen::generate
5: wasm_bindgen::main
6: std::sys_common::backtrace::__rust_begin_short_backtrace
7: std::rt::lang_start::{{closure}}
8: std::rt::lang_start_internal
9: main
Error: Running the wasm-bindgen CLI
Caused by: Running the wasm-bindgen CLI
Caused by: failed to execute `wasm-bindgen`: exited with exit status: 1
full command: "/home/omer/.cache/.wasm-pack/wasm-bindgen-55453f1f0ef1a1d5/wasm-bindgen" "/home/omer/fir/fir/target/wasm32-unknown-unknown/debug/fir.wasm" "--out-dir" "/home/omer/fir/fir/pkg" "--typescript" "--target" "bundler" "--debug"
The project: https://github.com/fir-lang/fir
It looks like walrus is unable to load the module because there's a function with too many locals. Is there a way to make an optimized (by rustc) build, but with debug info?
reneleonhardt
Metadata
Metadata
Assignees
Labels
No labels