4 ms·
The new release of TeaVM (0.11.0) now supports WebAssembly GC. This increases performance while further decoupling TeaVM apps from ECMAScript. TeaVM ( https:/
by TeaVMFan 2y ago
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/ 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 https://frequal.com/Flavour/book.html ) and more projects listed here: https://www.frequal.com/TeaVM/TeaVmBasedSites.html 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-to-js.html https://renato.athaydes.com/posts/comparing-jvm-alternatives...
- pestatije 2y agowhats the status of swing? can we port old applets easily? multi-threading or am i dreaming?
- TeaVMFan 2y agoNo Swing support at present. There is an issue filed, but it is in need of an implementer: https://github.com/konsoletyper/teavm/issues/406 https://github.com/konsoletyper/teavm/issues/406 I made a general guide for migrating from Swing to TeaVM here: https://frequal.com/TeaVM/migration/MigratingFromSwingToTeaVm.html 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.html https://frequal.com/java/RestoringA19YearOldGameWithTeaVm.ht...
- invalidname 2y agoYou can use Codename One whose web port is based on TeaVM. The API is very much like Swing. Albeit more focused on mobile.
- TeaVMFan 2y ago+1 for for Codename One. It is the only tool I use when I need a mobile-only app. I have built numerous apps using Codename One, and have released 2 of them in app stores. Great Swing-like API, great examples, great documentation.
- shannah78 2y agoI think Swing is a non-goal of this project. It provides good interop with the DOM and core JS methods, and it makes it easy to create your own interop for JS apis that aren't in the core. There are at least two GUI toolkits that run on TeaVM: 1. Codename One. Similar to swing, but focused on mobile https://www.codenameone.com https://www.codenameone.com 2. SnapKit. Targeted at desktop. Also a light-weight toolkit, like Swing. https://github.com/reportmill/SnapKit https://github.com/reportmill/SnapKit
- peutetre 2y ago> I think Swing is a non-goal of this project. It could work though by drawing to canvas. That's what Avalonia does in C#: https://avaloniaui.net/ https://avaloniaui.net/ Here's a clone of Visual Basic 6 written with Avalonia and compiled to WebAssembly: https://bandysc.github.io/AvaloniaVisualBasic6/ https://bandysc.github.io/AvaloniaVisualBasic6/ https://github.com/BAndysc/AvaloniaVisualBasic6 https://github.com/BAndysc/AvaloniaVisualBasic6
- red1111 2y agoIf that's your goal, you should look at CheerpJ, which supports Swing and has the goal of making it so you can easily port applets and other existing apps to the web. I think TeaVM is more focused on letting you share code with the web instead of porting entire apps.