GWt TeaVM comparison

66 views
Skip to first unread message

Tim Macpherson

unread,
Sep 3, 2026, 5:43:09 PM (6 days ago) Sep 3
to GWT Users
Maybe interesting for some:
.
I'm using TeaVM. Main problem is source map debugging will  usually descend into transpiled js, GWT doesn't have that problem otherwise ok it it lasts.

Craig Mitchell

unread,
Sep 3, 2026, 11:31:19 PM (6 days ago) Sep 3
to GWT Users
Do you use it to compile to JavaScript or WebAssembly?

I'd love to compile Java to WebAssembly, but I'm too nervous about the edge cases.

Dmitrii Tikhomirov

unread,
Sep 3, 2026, 11:36:53 PM (6 days ago) Sep 3
to google-we...@googlegroups.com

You can use GraalVM to compile Java to WebAssembly.

 The main limitation is multithreading; almost everything else works. 

If you need a very small WASM binary, you can use J2CL. 

I’ve actually already added WASM support to the j2cl-maven-plugin, but I still haven’t gotten around to publishing it.


--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/9335d428-ddc6-4f79-b180-07f733051f05n%40googlegroups.com.

Craig Mitchell

unread,
Sep 3, 2026, 11:48:54 PM (6 days ago) Sep 3
to GWT Users
I looked at GraalVM as a JVM replacement, but it wouldn't work with the libraries I use (Google Datastore mainly).  I didn't realise it could also be used to compile WebAssembly.  Thanks, will check it out!

Will also check out J2CL for Web Assembly.  Publish the plugin!  :-D

Tim Macpherson

unread,
Sep 4, 2026, 4:07:30 PM (5 days ago) Sep 4
to google-we...@googlegroups.com
I compile to JavaScript, I guess if I was compiling to WASM I wouldn't have the source map problems, no WASM code for it to keep stepping into. Other than that, I think I read WASM is used a lot for things like offloading web scraping to distributed devices,  but presumably where there's very demanding processing it's  more efficient. I do a lot of D3 in TS, I presume WASM can bridge to that so it's worth considering 
Reply all
Reply to author
Forward
0 new messages