WebAssembly announced

Just wondering about this: https://brendaneich.com/2015/06/from-asm-js-to-webassembly/
This can be a compile target at some point, right ?

Its already up for debate:
https://groups.google.com/forum/#!topic/haxelang/LHLsSQ92ZaA

1 Like

You can already compile OpenFL to asm.js using Emscripten, I suppose this will be an extension of the same?

1 Like

So Emscriptem does JS from c++ ? but the way I read it Web Assembly is a sort of bitecode generated from a LLVM intermidiate representation state of the code. Also, that you can view a sort of code map corresponding to the binary… dunno. Just watched the ES6 announcement and thought this could be good for Haxe and OpenFL.

Emscripten compiles C++ to LLVM, then goes from LLVM to JavaScript (using the asm.js subset, optionally)

We can compile Lime to C++ using Emscripten, and instead of LLVM to plain JavaScript or asm.js, it sounded like the announcement said that Emscripten was adding support to go to WebAssembly, which is more of a “group effort” at something like asm.js, if I understood properly

1 Like

At the moment is there some problem because there is no garbage collection in wasm so this will only be possible when it has gc, or did I get that part wrong ?

Edit: asking this because I read that:
"As soon as the first wasm compiler comes out, we will have a haxe target via hxcpp. Since the hxcpp GC does not need and special OS features like page marking, it “just works” in emscripten (once the upside-down stack was fixed). "

We’ve supported Emscripten in the past, HXCPP has its own GC, so no need for the target to have one :slight_smile:

1 Like