Stream: wasmtime

Topic: Inspecting bytecode instruction in Wasm and Pulley


view this post on Zulip Antoine Lavandier (Jun 02 2026 at 07:30):

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 !

view this post on Zulip Victor Adossi (Jun 02 2026 at 08:16):

Hey Antoine, have you by any chance looked at the pulley-interpreter crate's decode-related functions/modules?

view this post on Zulip Victor Adossi (Jun 02 2026 at 08:18):

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!

view this post on Zulip Antoine Lavandier (Jun 02 2026 at 10:02):

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

view this post on Zulip Chris Fallin (Jun 02 2026 at 15:47):

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