twiggy
twiggy copied to clipboard
Emit standalone, interactive HTML pages with Yew
We should be able to emit an HTML file containing:
- the whole serialized IR graph (not just one analysis on it) as JSON
- a base 64 encoded
.wasmblob, that contains a Yew app that deserializes the IR graph and then interactively runs any analysis on it that you might choose.
This HTML file would be able to be sent easily as an email attachment or uploaded to a bug tracker, etc. Since it is just a single HTML file, and you wouldn't need to wrangle an HTML file and a JS file and a wasm file and ... and keep their relative positions on the filesystem correct.
And whoever you sent this HTML file to wouldn't need to have svelte already installed either.
Also, the web would be a good place to create visualizations like tree maps
@mbebenita wants something like this to integrate into wasm studio. In this use case, crucially, it would be able to parse new binaries live in the website, not work only with some extant parsed IR.
Since it is just a single HTML file, and you wouldn't need to wrangle an HTML file and a JS file and a wasm file and ... and keep their relative positions on the filesystem correct.
We can handle this use case through WebAssembly.Studio fiddle URLs.
Would you be supportive in closing this in favor of: https://github.com/rustwasm/twiggy/issues/581 ?
I made something that might be related to this https://github.com/zxch3n/wasm-size-inspector
https://github.com/rustwasm/twiggy/assets/18425020/7feca43b-9451-446b-857f-fd0da6ab7ef6