Once the SIMD stuff is in, it may even have enough performance for music plugins. wasm codecs would be real cool too. Nobody likes having to build and install ffmpeg. `ffmpeg-4.0.wasm`... just imagine.
As a (backend) Java dev, I couldn't let that stand. And indeed I found out java now offers a tool called jlink with first class support, that will create a system native (e.g. .dmg on my macbook) executable with the JRE embedded. The javafx example project* I found could be downloaded, built and run from its native release all within less than 5 minutes.
Mind you the Hello World example executable is 80mb and takes 6 seconds to start, but I feel like with the garbage we are used to in regards to desktop applications, this totally holds up -doesn't everything else usually bundle all of chrome? I have also read there are simple command line options to reduce the size to about 50mb.
A framework producing a Hello World application, even if it has a GUI, with a double- or triple-digit size in MB and memory consumption on the same order, is doing something very wrong.
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.
Last time I checked, jlink tool refused to make use of those "automatic module" dependencies when creating an image.
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.
Pointing to the 2 most recent projects I have, my Microsoft Paint clone starts up ~0.25 secs, and my Checkers clone is the same.
6-10mb single binary
use any frontend js tech you want
automatically go functions exposed to the js side so you don't need to think about making endpoints, it makes and uses a websockets between the binary and the ui
uses WebView2 and not chrome
> By using the OS's native web renderer, the size of a Tauri app can be less than 600KB.
4 if you count the Linux kernel of 2020 as distinct from the Linux kernel of 2024.
A userspace, in-process solution is very very appealing until everyone is on Linux of 2024+.
Why? Or rather, what's the alternative?
Wasm is currently an alternative nobody asked for.
What if you want to run your unmodified executable on various architectures?
The JVM kind of does that, but not nearly every language can compile to that as a target, and if you want WASM-like sandboxing you need to deal with security managers, which is no fun at all (and I’ve never seen it done successfully for any non-Java software).
This means that not only do I need to take special care that my code can compile to wasm, but the platform devs (also me, in this case) needs to take special care to support a variety of different design choices in various wasm toolchains.
I’d rather just use SELinux containers and let the OS handle security.
Maybe Firecracker VMs like AWS lambda does.
But for when it's not, I think a platform-independent and language-agnostic bytecode standard is a valuable thing to have.
If I need to specifically support how certain languages compile to wasm (meaning I don’t support arbitrary wasm) then what’s the point?
It’s just Java applets again.
Just look at Ruffle (Flash Player reimplementation), V86 (x86 virtual machine), Google Earth, ...
Wasm on the Server is a fad, and sadly it's hijacking resources and design space from the real thing. WASI being a prime example: because of the "Component model", any attempt at tighter integration with the Browser API stopped in the hope for a magical solution to all computing problems.