wasm-tools
wasm-tools copied to clipboard
wast: Ordering of instructions is a bit disordered
wast::Instruction [1] lists all instructions that can be parsed by WebAssembly. Currently it is neither sorted by name, encoding, or proposal. This makes it a bit hard to find where an instruction is, and I'd be happy to open a PR to sort it in some way.
@alexcrichton What do you think about sorting by proposal and then sorting by encoding within proposal?
[1] https://github.com/bytecodealliance/wasm-tools/blob/e3f6090d993069c8abb15810ae82e12534cbbcc6/crates/wast/src/ast/expr.rs#L341
Sounds reasonable to me!