Live data from Hacker News

WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

developer.chrome.com

71–80 of 88 posts

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#71

Still waiting on DOM access. Once that's a thing, wasm is on the cards for me. + Nice to have would be multithreading without impractically restrictive browser headers

It would be cool if there was a wasm package manager that you could use from any language, and each lib could autogen interfaces in the language that you're working in

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#73

Earlier quoted context omitted.

You can leverage normal HTML though? Blazor does this with C#, you don't write it all to a canvas element, you just use C# to modify the html itself, basically replacing the 'react' part of the UI.

Yes, but it's important to think about the bridge/shim between your application code (the web assembly module) and the host (the browser). If you have a C++ game which draws to the screen with SDL, then you can use a shim to convert SDL calls into html canvas calls [1]. But if a backend engineer wants to compile their java swing application to web assembly, there is a larger impedance mismatch from Java Swing => reac…

For games canvas is fine. There is no 'web native ui' people expect.

I really don't think the use of this is running existing Java swing applications on the web. Maybe a bit of a hack for legacy software, but it's really using Java instead of Javascript, but using the normal DOM/HTML.

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#75
I think WasmGC can potentially take a lot of wind out of Rust's sails. If WasmGC reaches a smoothly working state, Rust will stop being the most obvious choice for writing memory-efficient WASM applications. And while some people may find writing Rust intrinsically fun and gratifying, Rust could really benefit from a use case where it truly dominates over other available options.

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#76
post #25

Finally, Java arrives to our browsers! Maybe we could use it to write some small applications with it, let's call them "applets".

I'm kind of excited to see the "WASM JVM" capable of running oldschool java applets (Much like Ruffle for flash).

This already exists (but it’s proprietary): https://cheerpj.com/

There is a free Chrome extension for it

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#77
post #71

Still waiting on DOM access. Once that's a thing, wasm is on the cards for me. + Nice to have would be multithreading without impractically restrictive browser headers

It would be cool if there was a wasm package manager that you could use from any language, and each lib could autogen interfaces in the language that you're working in

Ugh, last thing we need is yet another security nightmar--I mean package manager.

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#78

Exciting to see - this along with tail call support is opening the door to Scheme in the browser too: https://spritely.institute/news/scheme-wireworld-in-browser....

We're still missing a few things like continuations. However, full tail call support speeds that up a lot since then you don't need a trampoline function. I know there was a proposal for WASM continuations, but I think that got dropped due to complexity (I don't blame them, continuations are really tricky to optimize since they are such a powerful control flow tool).

Guile Hoot has continuations.

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#79
post #2

This starts to open a lot of very interesting new doors for web development in general. JavaScript is suddenly no longer the only real game in town it seems. I mean sure WASM has allowed C, C++ and Rust to run on the web for awhile now but they aren’t typically languages that web developers tend to have a lot of knowledge of or interest in learning. But Dart, Kotlin and Java for example, they very much are viable rep…

Kotiin already compiles to JavaScript, but to my understanding it has seen limited use in browsers. So why would people use it to target wasm if they don't already use it to target JS?

Re: WasmGC – Run GC languages such as Kotlin, Java in Chrome browser

#80
post #71

Still waiting on DOM access. Once that's a thing, wasm is on the cards for me. + Nice to have would be multithreading without impractically restrictive browser headers

It would be cool if there was a wasm package manager that you could use from any language, and each lib could autogen interfaces in the language that you're working in

Wasmer offers that already: https://wasmer.io/
Post reply on HN