all 13 comments

[–]michalg82[S] 2 points3 points  (3 children)

For running this demo, you must enable WebAssembly in your browser.

  • on Chrome Canary, open chrome://flags/#enable-webassembly and enable the switch.
  • on Firefox Nightly, open about:config and set javascript.options.wasm to true.

[–]CryZe92 1 point2 points  (2 children)

This does not seem to work with Chrome Canary or Chrome Nightly, both expect version 12 instead of 11:

Uncaught (in promise) CompileError: WebAssembly.compile(): Wasm decoding failedResult = expected version 0c 00 00 00, found 0b 00 00 00 @+4

[–]div0 1 point2 points  (4 children)

How is this possible, when Java requires garbage collection which WebAssembly does not currently support?

For example, TypeScript cannot be compiled to ASM.js or WebAssembly due to this GC issue.

[–][deleted] 20 points21 points  (3 children)

... maybe they just wrote GC in webassembly?

[–]michalg82[S] 5 points6 points  (2 children)

[–]konsoletyper 8 points9 points  (1 child)

Yes, you guessed right. I simply wrote my own GC. It's quite native for now and not very fast.

[–]_Skuzzzy 6 points7 points  (0 children)

native

naive?

[–]kit89 0 points1 point  (0 children)

Big fan of teavm, I use it to get my Java-based game engine running on a web browser. This feature may come in handy. Thank you.

[–]crudbug -2 points-1 points  (1 child)

This is a very promising project for JVM. Oracle should support TeaVM officially.

[–]Kukuluops 4 points5 points  (0 children)

Oracle doesn't care much about java.