twiggy icon indicating copy to clipboard operation
twiggy copied to clipboard

Emit standalone, interactive HTML pages with Yew

Open fitzgen opened this issue 7 years ago • 6 comments

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 .wasm blob, 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.

fitzgen avatar Feb 16 '18 13:02 fitzgen

And whoever you sent this HTML file to wouldn't need to have svelte already installed either.

fitzgen avatar Feb 16 '18 13:02 fitzgen

Also, the web would be a good place to create visualizations like tree maps

fitzgen avatar Feb 16 '18 13:02 fitzgen

@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.

fitzgen avatar Feb 27 '18 23:02 fitzgen

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.

mbebenita avatar Feb 28 '18 01:02 mbebenita

Would you be supportive in closing this in favor of: https://github.com/rustwasm/twiggy/issues/581 ?

AlexEne avatar Aug 06 '21 20:08 AlexEne

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

zxch3n avatar Jan 31 '24 10:01 zxch3n