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
wasmtimeon Windows unless I passed the--releaseflag when I built it. If I built the WASM module in debug mode,wasmtimegives 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-wasitarget andwasmtime.cargo newa hello-world program.cdinto the hello-world directory andcargo build --target wasm32-wasi- Run
wasmtime run .\target\wasm32-wasi\debug\hello-world.wasmResults
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 functionEnvironment
Windows 10, x64
Rust 1.40.0
Wasmtime 0.20.0Additional information
- If I
cargo build ... --releaseand use wasmtime to run the release build, it works.- If I run the debug build on Linux (WSL Ubuntu), it works.
Last updated: Dec 06 2025 at 06:05 UTC