News for hackers. Stuff that matters.
Re:Universal Binaries Using WASM by jokoon on Tuesday February 26, 2019 @08:40AM (#19254166)
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.

Re:Universal Binaries Using WASM by flohofwoe on Tuesday February 26, 2019 @09:41AM (#19254613)
Depends 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).

Re:Universal Binaries Using WASM by pjmlp on Tuesday February 26, 2019 @10:15AM (#19254898)
Re:Universal Binaries Using WASM by appcypher on Tuesday February 26, 2019 @03:27PM (#19258025)
You 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

Re:Universal Binaries Using WASM by steveklabnik on Tuesday February 26, 2019 @10:28AM (#19255005)
Cheerp 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...