$ wasmtime -D coredump=/tmp/coredump foo.wasmthread 'main' panicked at 'attempt to subtract with overflow', foo.rs:10:7note: run with `RUST_BACKTRACE=1` environment variable to display a backtraceError: failed to run main module `foo.wasm`Caused by: 0: Core dumped at /tmp/coredump 1: failed to invoke command default 2: error while executing at wasm backtrace: ...
$ wasmgdb foo.wasm /tmp/coredumpwasmgdb> bt...#13 000175 as panic () at library/core/src/panicking.rs#12 000010 as a (v=???) at /path/to/foo.rs#11 000009 as c (v=???) at /path/to/foo.rs#10 000011 as b (v=???) at /path/to/foo.rs#9 000010 as a (v=???) at /path/to/foo.rs#8 000012 as main () at /path/to/foo.rs...