Stream: git-wasmtime

Topic: wasmtime / issue #2294 Modules built from Rust only work ...


view this post on Zulip Wasmtime GitHub notifications bot (May 05 2022 at 16:46):

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.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2022 at 16:46):

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

  1. Get hold of a Windows box. Install Rust, the wasm32-wasi target and wasmtime.
  2. cargo new a hello-world program.
  3. cd into the hello-world directory and cargo build --target wasm32-wasi
  4. 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.0

Additional information


Last updated: Nov 22 2024 at 17:03 UTC