Hello,
Is there a way to inspect the instructions in a Wasm or Pulley bytecode, and potentially reject modules based on the instructions that they contain ?
Thanks !
Hey Antoine, have you by any chance looked at the pulley-interpreter crate's decode-related functions/modules?
There are a bunch of options for manipulating wasm binaries and performing work on their instructions, some crates that may be helpful to you:
Basically all the crates in wasm-tools should help, depending on what you want to do!
I had not, thanks for the pointers ! Looking very briefly at the pulley side, this allows me to inspect operations. How can I find the resulting pulley bytecode from specific Wasm instructions. My use case would be tracking the presence of some specific instructions from the bulk-memory-operations proposal
You shouldn't inspect Pulley bytecode to determine that: it's an internal implementation detail and Wasmtime is free to compile bulk-memory-operations opcodes to whatever it likes. You'll want to examine Wasm bytecode to determine the presence of particular Wasm operations
Last updated: Jul 29 2026 at 05:03 UTC