Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a means to learn about both WebAssembly and Rust, I started writing a WebAssembly binary decoder (i.e. a parser for `.wasm` files) from scratch.

Recently it hit v2.0 spec conformance. 3.0 is next on the roadmap. (I'm executing it against the upstream spec test suite.)

I don't plan to make it a highly-performant decoder for use in production environments, but rather one that can be used for educational purposes, easy to read and/or debugging issues with modules. That's why I decided not to offer a streaming API, and why I'll be focusing on things like good errors, good code docs etc.

https://github.com/agis/wadec

P.S. I'm new to the language so any feedback is more than welcome.





This is cool.

I started to look at the wasm stuff, but all the documentation I found was so high-level as to be meaningless.

What do you recommend for someone who would want to be able to create or read .wasm files?


I'd say jump straight to the specification (maybe v2, which is simpler).

But I occasionally saw one or two articles around where they explain how the binary format works, which could be a good introduction before jumping to the spec.


Thanks!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: