wasm-tools
wasm-tools copied to clipboard
workspace: Remove `wasmparser::Operator` type usage
With https://github.com/bytecodealliance/wasm-tools/pull/697 merged it is possible to remove the Operator type from the wasmparser crate.
The new VisitOperator trait allows to parse and validate Wasm without the need for matching on an Operator. Instead respective visit methods are invoked which avoid unnecessary unpredictable branches and is therefore the preferred and recommended API to use for high-performance Wasm parsing and validation.
This issue tracks progress and discussion for removing the Operator type.
cc @alexcrichton
ToDo
- [ ] Remove
Operatortype in thewasmparsercrate.- [x]
ConstExprvalidation: https://github.com/bytecodealliance/wasm-tools/pull/737 - [ ]
enum Operator
- [x]
- [x] Remove
Operatortype in thewasmparser-dumpcrate.- https://github.com/bytecodealliance/wasm-tools/pull/712
- [ ] Remove
Operatortype in thewasm-mutatecrate. - [x] Remove
Operatortype in thewasmprintercrate.- https://github.com/bytecodealliance/wasm-tools/pull/721
- [ ] Rewrite existing examples in terms of the new
VisitOperatorAPI. - [ ] Adjust docs for usage information about the new
VisitOperatorAPI.