Hacker News new | ask | show | jobs
by benkuykendall 3648 days ago
Huh, the AST looks pretty human readable. Anyone have tips for writing WebAssembly without using asm.js? Even a pointer to decent documentation would be great.
3 comments

Well, if you're comfortable with that AST text-format, check [1] for docs and examples (the .wast files in the links). If you're super brave, there's hints about the Binary AST format here [2]

[1] https://github.com/WebAssembly/design/blob/master/TextFormat...

[2] https://github.com/WebAssembly/design/blob/master/BinaryEnco...

See my comment above, ultimately you should be able to generate WebAssembly directly from your C compiler (and other languages too). You can write it by hand as well, but that's not the primary goal of the specification.

We should have a text format soon too, which will be nicer than the AST format to read/write by hand.

github.com/WebAssembly/sexpr-wasm-prototype

github.com/WebAssembly/spec

github.com/WebAssembly/design