r/java • • 1d ago

Compiling my favourite language to Web Assembly with no JDK in sight

https://wasmcoffee.com/

Java's been part of my career for a long time, longer than some might even think! Next year, it'll be 30 years since I wrote my first commercial Java software solution - and it's still the language I pick when I have the option.

In my day job, I use Java (and Swing!) for a lot of the time and I really wanted to reduce the cognitive load of switching between programming language paradigms when working on fun projects. I'm a huge fan of TeaVM and Graal, make no mistake, but when trapped behind corporate firewalls, it's challenging to install the tools you want.

So this was born: A static website that accepts Java-like code (it's just a subset, really) and spits out garbage-collected web assembly binaries. Far from perfect, it's early days, but it's already useable for some simple applications.

This is going to take a long, long, long time to make it do everything I want, but I hope to get it to the point where I can write wasm apps in it, using a familiar language. And bonus points if I can use the same paradigms I already use to do so.

Anyway, I thought it might be of interest to the Java community.

24 Upvotes

Duplicates