3 ms·
Part of the spec is a reference interpreter written in OCaml. Edit: link: https://github.com/WebAssembly/spec/tree/master/interpreter https://github.com/WebAss
by pizlonator 10y ago
Part of the spec is a reference interpreter written in OCaml.
Edit: link: https://github.com/WebAssembly/spec/tree/master/interpreter https://github.com/WebAssembly/spec/tree/master/interpreter
- nickpsecurity 10y agoA semi-formal, reference spec done declaratively in Ocaml using s-expressions for the AST? When did The Right Thing become popular in browser developments!? I'm impressed. Way better than trying to get compatible, correct implementations out of a pile of English and text art as done by some other groups.
- pizlonator 10y agoThe jury is still out on whether this interpreter gets to be called a reference spec, or even a spec. It may be a reference interpreter that is offered as a companion to the official English text. It all depends on what others feel comfortable with. But I'd rather that this OCaml program was _the_ spec. I found it enjoyable to read the other day when I was trying to figure out WebAssembly verification semantics. Much better than reading an English description of a verification algorithm.