3 ms·
There's now an interesting alternative to Emscripten called WaJIC: https://github.com/schellingb/wajic https://github.com/schellingb/wajic Enables most of the
by flohofwoe 4y ago
There's now an interesting alternative to Emscripten called WaJIC:
https://github.com/schellingb/wajic https://github.com/schellingb/wajic
Enables most of the "Emscripten magic" (like embedding Javascript code into C/C++ files), but in a more bare bones package (apart from clang it essentially just uses the wasm-opt tool from Binaryen for post-processing).
(to be clear, wajic has fewer out-of-the-box features than Emscripten, but it might be an alternative for very small projects which don't need all the compatibility shims provided by Emscripten, while still providing features to simplify calling between C/C++ and WASM.
Also on an unrelated note: I found working with WASM a lot more enjoyable after I switched from C++ to plain C. The resulting WASM blobs are usually smaller, and interfacing between JS and WASM is a lot easier down on the C API level.
- singularity2001 4y agoThere is also that alternative called clang, which has builtin WASM support since version __.0 (but you need to write js glue code yourself)
- flohofwoe 4y agoBoth WAjic and Emscripten depend on Clang to compile to WASM, but Clang alone isn't very useful except for very simple WASM libraries that don't need to call out into web APIs. WAjic adds exactly the part that simplifies writing the JS glue.
- glandium 4y agoIIRC, it's since version 8.0.