Live data from Hacker News

New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required

teavm.org

1–10 of 59 posts

Re: New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required

#2
The new release of TeaVM (0.11.0) now supports WebAssembly GC. This increases performance while further decoupling TeaVM apps from ECMAScript.

TeaVM ( https://teavm.org/ ) is an Apache-licensed project, free for use in commercial projects. It is mature and used widely, including in frameworks like Flavour ( https://frequal.com/Flavour/book.html ) and more projects listed here: https://www.frequal.com/TeaVM/TeaVmBasedSites.html

TeaVM compiles Java code to run in the browser, efficiently and quickly. It features short build times, small downloadable files, and a batteries-included toolset (including minification, tree-shaking, and packaging). Previous releases have conquered all similar open-source tools (that support threading) in independent testing: https://renato.athaydes.com/posts/comparing-jvm-alternatives...

Re: New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required

#3
post #2

The new release of TeaVM (0.11.0) now supports WebAssembly GC. This increases performance while further decoupling TeaVM apps from ECMAScript. TeaVM ( https://teavm.org/ ) is an Apache-licensed project, free for use in commercial projects. It is mature and used widely, including in frameworks like Flavour ( https://frequal.com/Flavour/book.html ) and more projects listed here: https://www.frequal.com/TeaVM/TeaVmBased…

whats the status of swing? can we port old applets easily? multi-threading or am i dreaming?

Re: New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required

#4
post #2

The new release of TeaVM (0.11.0) now supports WebAssembly GC. This increases performance while further decoupling TeaVM apps from ECMAScript. TeaVM ( https://teavm.org/ ) is an Apache-licensed project, free for use in commercial projects. It is mature and used widely, including in frameworks like Flavour ( https://frequal.com/Flavour/book.html ) and more projects listed here: https://www.frequal.com/TeaVM/TeaVmBased…

whats the status of swing? can we port old applets easily? multi-threading or am i dreaming?

No Swing support at present. There is an issue filed, but it is in need of an implementer: https://github.com/konsoletyper/teavm/issues/406

I made a general guide for migrating from Swing to TeaVM here: https://frequal.com/TeaVM/migration/MigratingFromSwingToTeaV...

For a more specific example, I ported an open-source Java applet and described the process here: https://frequal.com/java/RestoringA19YearOldGameWithTeaVm.ht...

Re: New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required

#6
I am more enthusiastic with Kotlin also compiling to wasm with Jetpack compose and now working in all major browsers. It provides a full modern UI framework and also compiles to mobile and desktop. Code is also usable on server and if using the JVM fully interoperable with Java.

Re: New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required

#8
post #6

I am more enthusiastic with Kotlin also compiling to wasm with Jetpack compose and now working in all major browsers. It provides a full modern UI framework and also compiles to mobile and desktop. Code is also usable on server and if using the JVM fully interoperable with Java.

Try calling Kotlin co-routines from Java, fully interoperable is it not.

Additionally I really dislike the anti-Java discourse in Kotlin circles, as if Kotlin was able to stand on its own, without the Java ecosystem, or Google's making it Java replacement on Android.

Re: New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required

#9
Love the revenge of plugins.

We might have lost a decade since Unreal was running on Flash Crossbridge, yet thanks to Web trying to be a app platform to replace native apps, we are back full circle.

Java, .NET have their plugins back, even if with additional turtles along the stack, and stuff like Flutter are the new Flash.

I guess, thanks to all WebGL, WebGPU and WebAssembly folks

Re: New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required

#10
post #7

Ironic, given Java Applets were going to run in browsers

They were running, not going to, until Java 8.

While Java Kernel did improve download times against Flash, the latter tooling was much better, and still downloaded faster.

Had it not been for Apple and iOS forbidden, mostly due to app store than security concerns, and classical plugins would be around.

Since browsers never contended themselves with being document only, leaving the rest for native apps, now we have plugins back.

Post reply on HN