News for hackers. Stuff that matters.
Re:WebAssembly Adoption: Is Slow and Steady Winning the Race? by davidalayachew on Wednesday April 10, 2024 @11:27PM (#39998136)
The example in question is very much a "include-more-than-you-need-by-default" problem. So, bloat.

Java lets you include only the parts of the JDK that you need for your app. These parts are called modules.

Unfortunately, all modules MUST include the base module (java.base), which is ~22MB. And if you add a GUI (java.desktop), that's another ~13MB. And since the linked example uses Java FX, there is yet another layer on top of that.

Java is doing a lot of work to bring that number down by a lot. More to come.

Re:WebAssembly Adoption: Is Slow and Steady Winning the Race? by obdev on Thursday April 11, 2024 @09:58PM (#40008735)
May I ask how do you solve the problem that almost none of the 3rd party libraries in Java ecosystem use modules?

Last time I checked, jlink tool refused to make use of those "automatic module" dependencies when creating an image.

Re:WebAssembly Adoption: Is Slow and Steady Winning the Race? by davidalayachew on Friday April 12, 2024 @04:12AM (#40010416)
That information is several years out of date. At best, the build tools in the ecosystem don't do a great job of supporting modules, but that's about it.

And your comment about `jlink` is only true if your application is nor modular/ does not use modules with a well-formed `module-info.java`. If your application is modular, everything happens as expected. I do this for all the builds for all of my projects. Last build from last night confirms that it still works, and works well.