I am attempting to display backtrace with files and line numbers on a trap with wasmtime using err.downcast_ref::<wasmtime::WasmBacktrace>()
.
When I compile a component with --target=wasm32-wasip2
, I can do that without any issue.
However when I do the same with --target=wasm32-unknown-unknown
and transform the core WASM module with wasm-tools 1.225.0, the FrameSymbol
s are empty for each FrameInfo
. Is this a limitation of rustc
or the transformation or am I doing something wrong?
transform the core WASM module with wasm-tools 1.225.0
What is this transform doing? If you're editing the code
section of the module then all the offsets in dwarf debugging information will need to be updated, and wasm-tools
doesn't do that for example.
I am running wasm-tools component new
to turn it into a Component.
Ah in that case that should work fine, and the two targets should behave the same. Can you upload a reproduction?
Last updated: Apr 08 2025 at 02:30 UTC