Closed
Description
I may just be doing something wrong, but it appears that turning on LTO gives wasm-bindgen
a hard time resolving imports. Although I can compile, use wasm-bindgen
, wasm-gc
, etc. without any warnings or errors, I end up at runtime with messages like Module not found: Error: Can't resolve 'env'
with the two offending lines in the resulting .wasm being:
(import "env" "_ZN4core9panicking18panic_bounds_check17hc53f1bd1a37ebcdeE" (func $core::panicking::panic_bounds_check::hc53f1bd1a37ebcde (type $t8)))
(import "env" "_ZN4core9panicking5panic17h04cfbe531d9ab9f6E" (func $core::panicking::panic::h04cfbe531d9ab9f6 (type $t1)))
Setting lto = false
in Cargo.toml fixes this. However, previous versions (<=0.2.13
) seemed to work fine with LTO, so I'm not sure what's up.
Metadata
Metadata
Assignees
Labels
No labels