alexcrichton commented on issue #2294:
I believe this is no longer emitted in Rust modules and additionally Wasmtime has various knobs to control the errors in this area around unknown exports, so I'm going to close this.
alexcrichton closed issue #2294:
When I write a program in Rust and compile it to WASM, I cannot run it under
wasmtime
on Windows unless I passed the--release
flag when I built it. If I built the WASM module in debug mode,wasmtime
gives the error "command export '__rustc_debug_gdb_scripts_section__' is not a function". All other combinations of OS and build mode work: the error is specific to debug builds under Windows.Steps to reproduce
- Get hold of a Windows box. Install Rust, the
wasm32-wasi
target andwasmtime
.cargo new
a hello-world program.cd
into the hello-world directory andcargo build --target wasm32-wasi
- Run
wasmtime run .\target\wasm32-wasi\debug\hello-world.wasm
Results
Expected: Should print
Hello, world!
Actual:
Error: failed to run main module `.\target\wasm32-wasi\debug\hello-world.wasm` Caused by: 0: failed to instantiate ".\\target\\wasm32-wasi\\debug\\hello-world.wasm" 1: command export '__rustc_debug_gdb_scripts_section__' is not a function
Environment
Windows 10, x64
Rust 1.40.0
Wasmtime 0.20.0Additional information
- If I
cargo build ... --release
and use wasmtime to run the release build, it works.- If I run the debug build on Linux (WSL Ubuntu), it works.
Last updated: Dec 23 2024 at 12:05 UTC