Stream: general

Topic: Missing frame symbols on transformed wasm32-unknown-unknown


view this post on Zulip Tomas Olvecky (Mar 07 2025 at 18:17):

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 FrameSymbols are empty for each FrameInfo. Is this a limitation of rustc or the transformation or am I doing something wrong?

view this post on Zulip Alex Crichton (Mar 07 2025 at 18:19):

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.

view this post on Zulip Tomas Olvecky (Mar 07 2025 at 19:00):

I am running wasm-tools component new to turn it into a Component.

view this post on Zulip Alex Crichton (Mar 07 2025 at 19:10):

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