mirror of
https://github.com/wader/fq.git
synced 2024-11-26 10:33:53 +03:00
563 B
563 B
Count opcode usage
$ fq '.sections[] | select(.id == "code_section") | [.. | .opcode? // empty] | count | map({key: .[0], value: .[1]}) | from_entries' file.wasm
List exports and imports
$ fq '.sections | {import: map(select(.id == "import_section").content.im.x[].nm.b), export: map(select(.id == "export_section").content.ex.x[].nm.b)}' file.wasm
Authors
- Takashi Oguma @bitbears-dev @0xb17bea125