-
Notifications
You must be signed in to change notification settings - Fork 323
Description
Even though wasmi is an interpreter VM for Wasm we are missing proper debugging functionality such as backtraces.
This is a heavily requested feature by smart contract users so that they can finally properly debug and analyze their smart contract exeuctions.
Having backtraces is not sufficient by its own since we also are required to show proper function and local variable names for a nice debugging UX. For this purpose we also need to support the Wasm name section that provides a Wasm VM with those names for a given Wasm blob.
Furthermore any backtrace implementation for wasmi should ideally not conflict with the performance in case those backtraces are not required. Therefore we need to find a design that has zero cost for non-debug executions.
ToDos
- Implement support for Wasm
namesection. - Implement backtraces for
wasmiexecution debugging without overhead of non-debug executions.
Related Work
- Wasmtime
- We want similar behavior as Wasmtime with respect to its backtrace functionality and serialization of its backtraces.
Config::wasm_backtrace: https://docs.rs/wasmtime/2.0.0/wasmtime/struct.Config.html#method.wasm_backtraceConfig::wasm_backtrace_details: https://docs.rs/wasmtime/2.0.0/wasmtime/struct.Config.html#method.wasm_backtrace_details