WebAssembly / binaryen

Optimizer and compiler/toolchain library for WebAssembly
Apache License 2.0
7.44k stars 737 forks source link

Output structured data format based on wasm-delegations.def #6460

Open phated opened 6 months ago

phated commented 6 months ago

Based on https://github.com/WebAssembly/binaryen/discussions/6225#discussioncomment-8954759

Currently, many Wasm instructions are defined in src/wasm-delegations*.def, which is a C header that Binaryen and tools within Binaryen can use.

This file could also be processed and output as structured data (JSON, YAML, etc) in the build artifacts, which would allow other tools and bindings to consume it for automation.

I'm particular to JSON, but we should see what others would want to consume.

kripken commented 6 months ago

I opened #6469 for this, let me know what you think there.