Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Generating source map files for WASM files #851

Open
Mforcen opened this issue Aug 12, 2024 · 3 comments
Open

Proposal: Generating source map files for WASM files #851

Mforcen opened this issue Aug 12, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Mforcen
Copy link

Mforcen commented Aug 12, 2024

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.

@ctron
Copy link
Collaborator

ctron commented Aug 26, 2024

Yes, that would be awesome!

@ctron ctron added enhancement New feature or request help wanted Extra attention is needed labels Aug 26, 2024
@Mforcen
Copy link
Author

Mforcen commented Aug 26, 2024

Great! I will start working on this.

Best regards!

@Mforcen
Copy link
Author

Mforcen commented Sep 2, 2024

After some investigation, I've discovered that there is a pending feature in walrus that would allow wasm-bindgen to generate binaries while keeping the debug information up to date.

I'll try to start working on this first.

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants