File: examples-rust-core-dumps.md

package info (click to toggle)
rust-wasmtime 26.0.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 48,504 kB
  • sloc: ansic: 4,003; sh: 561; javascript: 542; cpp: 254; asm: 175; ml: 96; makefile: 55
file content (19 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Core Dumps

You can also [browse this source code online][code] and clone the wasmtime
repository to run the example locally.

[code]: https://github.com/bytecodealliance/wasmtime/blob/main/examples/fib-debug/main.rs

This examples shows how to configure capturing [core dumps] when a Wasm guest
traps that can then be passed to external tools (like [`wasmgdb`]) for
post-mortem analysis.

[core dumps]: https://github.com/WebAssembly/tool-conventions/blob/main/Coredump.md
[`wasmgdb`]: https://github.com/xtuc/wasm-coredump/blob/main/bin/wasmgdb/README.md

## `main.rs`

```rust,ignore
{{#include ../examples/coredump.rs}}
```