There's no "official" codebase per se: both Binaryen and WABT build binaries that will convert your wast text files into WebAssembly binaries, and are actively maintained and up-to-date. WABT will do so very directly. Binaryen translates first to an internal AST-based IR which has the consequence that the output will be slightly transformed in some cases (but mostly not significantly), but it also has optimizers that you can run if you want, and its default build has a library and API (libbinaryen and the binaryen-C API that you mentioned) that make it easier if you want to link it directly into your compiler (as opposed to running an external program). Binaryen is written in C++ and requires the usual C++ runtime features such as exception handling, whereas WABT is written in pure C, if that makes any difference to you. Ultimately if you just want to convert to wasm binary, either will do fine, and if you want more, Binaryen is intended to be a "batteries-included" kind of toolkit, and is more likely to have (or grow) useful functionality.
On Thu, Dec 8, 2016 at 7:16 AM <[email protected]> wrote: Hi, We recently added a WebAssembly textual format backend in our audio DSP language compiler (Faust : faust.grame.fr). Now we would like to directly generate binary, but this seems more difficult. Since a lot of code has already been written to deal with WebAssembly (AST, reader/writer..etc..) here https://github.com/WebAssembly, is there a recommended way or an "official" code base to be used for that purpose ? (I've seen binaryen-c.h and binaryen-c.cpp from the binaryen subproject ( https://github.com/WebAssembly/binaryen), there is also "wabt" here https://github.com/WebAssembly/wabt) Tanks for any advice. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
