Any WASM parser?

Any WASM parser? This one: https://crates.io/crates/wasm-reader has no API docs... and it was last updated 3 years ago.

I think binaryen will work for this.

At Wasmer, we use the wasmparser crate and it works great. It's also pure Rust so it can be used in apps that are compiled to WebAssembly, and it's compatible with streaming so you don't need to buffer everything up in memory before reading it.

I'd strongly recommend using wasmparser over something like binaryen-sys. Not only will it be safer and more portable, it's also maintained by The Bytecode Alliance who are actively developing the WebAssembly ecosystem and have a lot of really high quality developers working on these things.

2 Likes