trunk-rs/trunk

Proposal: Generating source map files for WASM files

Aperta

#851 aperta il 12 ago 2024

 (3 commenti) (5 reazioni) (0 assegnatari)Rust (315 fork)auto 404
enhancementhelp wanted

Metriche repository

Star
 (4347 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

I believe that having a proper way to track down stack traces into Rust code in browser DevTools. I've found this tool that generates a .map file that the browser can use to match js and wasm to rust code: https://github.com/mtolmacs/wasm2map. This tool can be used as a library or a CLI tool.

Proposal

Embed wasm2map in trunk, and adding a new step that generates the .map file to allow the browser devtools to correlate stacktrace addresses with rust source code file and lines.

Guida contributor