Live data from Hacker News

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

developer.chrome.com

31–40 of 88 posts

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

#31
post #14

Earlier quoted context omitted.

Already possible with PNaCL and CrossBridge in 2010, but yeah we needed to have it as a standard and delay everything for a decade.

You're entirely correct. Non-standard ("proprietary") things tend to not catch on.

The irony is that with ChromeOS taking over the Web it hardly matters.

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

#33
post #23

Maybe I'm old but, we already had this... it was called the tag and it let you embed Java applets. We also had Java Web Start. I feel like this solution in superior to both those things but it still feels like a step backwards.

Yep. Wrote a java applet for DHL back in 2003 to process the export shipment paperwork. Used Java Web Start to deploy. Worked great. Can't remember why applets were killed. Thinking maybe it was because of Microsoft.

it was chrome. Always have been. java applets means more money to oracle and less to google/apple/whatever

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

#34
Holy crap.

I remember following the GC proposal back in 2019 when the WebAssembly standard was barely out. Back then it felt like GC was right around the corner. Then as time went on, more parts were split off the proposal, and progress slowed more and more.

I can't believe it's finally coming out!

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

#35
post #9
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…

> 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. I think that main use case is not for the web developers who already know the tech needed for web development but actually vice-versa. E.g. you're a C/C++/Rust developer and you want to expose your product as a browser servi…

> E.g. you're a C/C++/Rust developer and you want to expose your product as a browser service - you transpile it to wasm and with a bit of JavaScript you integrate it into the end service

Speaking as someone who worked for two companies that tried to do exactly that, it's not that simple. The "bit of JavaScript" ends up requiring huge amounts of work, and the user experience feels un-browser-like, because you're fitting everything through a canvas element.

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

#36
Interesting - they essentially ship a GC inside the Wasm runtime that replaces what the language VM - be it the JVM, the .NET CLR, Go's GC would supply.

But that raises the question - wouldn't it imply that this GC needs to support every special feature of every language (interior pointers, pinning, value types etc.), and have access to the stack layout to have a chance of working?

Sounds like a hairy problem to me.

Although not having to ship a GC might be a major boon since in my experience, WASM runtimes tend to be on the larger size.

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

#38
post #13

Maybe I'm old but, we already had this... it was called the tag and it let you embed Java applets. We also had Java Web Start. I feel like this solution in superior to both those things but it still feels like a step backwards.

We basically took a 10 years delay to get back the productive plugin based frameworks from 2010.

But now there's a chance they'll run on the iPhone.

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

#40
post #9

Earlier quoted context omitted.

> 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. I think that main use case is not for the web developers who already know the tech needed for web development but actually vice-versa. E.g. you're a C/C++/Rust developer and you want to expose your product as a browser servi…

> E.g. you're a C/C++/Rust developer and you want to expose your product as a browser service - you transpile it to wasm and with a bit of JavaScript you integrate it into the end service Speaking as someone who worked for two companies that tried to do exactly that, it's not that simple. The "bit of JavaScript" ends up requiring huge amounts of work, and the user experience feels un-browser-like, because you're fitt…

I have almost no exposure to JS but what I have seen so far in WASM projects didn't seem to require that much of a non-usual work but, of course, YMMV.

To me the most challenging part seemed to be in the domain of debugging when things would go south because all of the sudden you have to become very intimate with how things work under the hood and across the whole stack: JS -> V8 -> WASM runtime -> Emscripten -> C++. There's not many people capable of doing that job.

> user experience feels un-browser-like

Perhaps Photoshop is not the classical example but I think it's one of the most craziest ones out there - humongous and extremely complicated C++ codebase consisting of every imaginable optimization and heavy lifting deployed as a WASM "plugin".

[1] https://medium.com/@addyosmani/photoshop-is-now-on-the-web-3...

[2] https://web.dev/articles/ps-on-the-web

Post reply on HN