rustwasm/twiggy

The item name for wasm type entries should have the stringified type

Closed this issue ยท 0 comments

๐Ÿ’ก Feature Description

We should render the human readable type along with which entry in the types section it is.

The change needs to happen in the parse_items trait method impl for TypeSection: https://github.com/rustwasm/twiggy/blob/master/parser/wasm_parse/mod.rs#L248-L249

๐Ÿ’ป Example Usage

Right now we get output like:

              7 โ”Š      0.00% โ”Š type[4]
              7 โ”Š      0.00% โ”Š type[11]
              6 โ”Š      0.00% โ”Š type[3]

but instead we should have output like:

              7 โ”Š      0.00% โ”Š type[4]: (i32,  i32) -> i32
              7 โ”Š      0.00% โ”Š type[11]: (i32) -> nil
              6 โ”Š      0.00% โ”Š type[3]: (f64) -> f64