Hacker News new | past | comments | ask | show | jobs | submit login

This is how.

The installed size of OpenJDK 17 JRE on my machine is 186MB, according to the package manager.

I suspect that the WASM VM embedded in the program demonstrated in the blog post is 1.5 to 2 orders of magnitude smaller.




I'm no expert but the JVM is very modular these days and just the minimal modules also give you an order or two smaller runtimes. My guess is a set of minimal OpenJDK modules will be on the same order as a WASM VM. Would be curious to hear from someone more in the know

Looking a the JRE size is a bit misleading bc it's been sort of deprecated. You're not really supposed to make Uberjars to run on a JRE anymore but are expected to bundle with the JVM modules you need. It can make very small bundles..

But naturally an Uberjars would be smaller. I think small executables are possible but are also just a nongoal now in the JVM world. Meanwhile they're obviously still very relevant in the webspace and hence WASM

you're not really gunna send JVM bundles dynamically over the wire.

I do sort of agree with the parent that while the goals are slightly different it feels like WASM reinvented the JVM without really bringing any huge improvement (while you loose several decades of libraries)


There are many JDKs available, some of which specializing in embedded, like this one: https://en.wikipedia.org/wiki/JamaicaVM


There is no such thing as a JRE anymore, the way to package a Java application for quite some time now is by using jlink/jpackage that creates a stripped “JRE” of only the used modules helping both the size and loading times.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: