fitzgen edited PR #5975 from explorer
to main
:
This implements Godbolt Compiler Explorer-like functionality for Wasmtime and Cranelift. Given a Wasm module, it compiles the module to native code and then writes a standalone HTML file that gives a split pane view between the WAT and ASM disassemblies.
THIS IS VERY MUCH AN MVP!!! Tons of stuff we could do with this, very little it actually does so far.
Usage:
$ wasmtime explore test.wasm -o test.explore.html $ xdg-open test.explore.html
Once visiting the HTML page, you can hover over lines of WAT or asm and the corresponding lines will be highlighted. You can also click to scroll the corresponding line into view.
Here is a little screen recording, although the mouse itself isn't captured so it is a little hard to see what is going on:
Screencast from 2023-03-09 17-22-06.webm
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
jameysharp submitted PR review.
jameysharp submitted PR review.
jameysharp created PR review comment:
If you can get the
TargetIsa
here, we have ato_capstone
method you can use instead of hard-coding that you want an x86 disassembler.
jameysharp created PR review comment:
You already mentioned it but I want to specifically highlight this change as needing to be reverted before this PR can merge.
alexcrichton submitted PR review.
fitzgen updated PR #5975 from explorer
to main
.
fitzgen submitted PR review.
fitzgen created PR review comment:
Unfortunately we don't have access to the
TargetIsa
here, but I did add the non-x86 cases.
fitzgen requested jameysharp for a review on PR #5975.
fitzgen requested alexcrichton for a review on PR #5975.
alexcrichton submitted PR review.
fitzgen updated PR #5975 from explorer
to main
.
fitzgen has enabled auto merge for PR #5975.
fitzgen updated PR #5975 from explorer
to main
.
fitzgen has enabled auto merge for PR #5975.
fitzgen merged PR #5975.
Last updated: Nov 22 2024 at 17:03 UTC