Rust type representing wat/wast instructions

Is there any crate, perferably compatible with wasmtime, that has enums corresponding to the instructions here:

https://webassembly.github.io/spec/core/text/instructions.html#variable-instructions

I'm looking to do "rust in memory enum/structure -> wat/wast"

1 Like

You're looking for the wast crate, which supports parsing the wat/wast format, and also has an AST for wat/wast.

1 Like

wast::Instruction - Rust looks like exatly waht I need. Thanks!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.