3 ms·
Any real, simple c++ toolchain compiling directly to .WASM? Emscripten is not really user friendly. Time is passing, WASM is here but I can't see decent toolc
by jokoon 8y ago
Any real, simple c++ toolchain compiling directly to .WASM?
Emscripten is not really user friendly.
Time is passing, WASM is here but I can't see decent toolchains available to work with it.
- flohofwoe 8y agoDepends on how you define "user friendly". IMHO emscripten does what a gcc-compatible C/C++ toolchain is supposed to do: > emcc hello.c -o hello.html ...which gives you a complete WebAssembly application runnable in the browser. With VSCode as IDE it's possible to build a fairly nice edit-compile-test workflow with Intellisense and error squiggles. BUT: What's really missing is proper debugging support (can mostly be worked around by debugging a platform-native executable compiled from the same source, but working source-level debugging for WASM blobs would be nice).
- pjmlp 8y agoYes, cheerp https://www.leaningtech.com/cheerp/ https://www.leaningtech.com/cheerp/
- steveklabnik 8y agoCheerp and emscripten are the only two choices for C++, as far as I know. That said, the Rust team has been putting a ton of work into a real, simple toolchain for exactly these reasons: tools matter for adoption. We'll see if the pain of the toolchain is less or greater than the pain of a different language...
- appcypher 8y agoYou can use the LLVM toolchain directly if you know your way around it. I believe the GCC folks were working on a wasm target a while ago but I don't know the ETA for that. If you are looking for an easy setup of LLVM's own wasm-target (which Emscripten will be switching to eventually), try this tool: https://github.com/appcypher/wasabi https://github.com/appcypher/wasabi