trunk-rs/trunk

Proposal: Generating source map files for WASM files

開放

#851 建立於 2024年8月12日

 (3 則留言) (5 個反應) (0 位負責人)Rust (315 個分叉)auto 404
enhancementhelp wanted

倉庫指標

星標
 (4,347 顆星)
PR 合併指標
 (平均合併 5天 21小時) (30 天內合併 4 個 PR)

描述

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.

貢獻者指南