boomskats 2 days ago

"Ha! I KNEW it! WebAssembly literally IS just a reinvention of the JVM!!1"

Wouldn't it be funny, after all that sandboxing and component modelling, if it was JNI and SwingSet3 that finally made enterprise Wasm a thing?

(also this is impressive, great job)

2
lesuorac 2 days ago

Java Applets probably would've snuffed out WASM if it was added into a browser by default (instead of an extension).

However, they were pretty insecure and caused a ton of problems for the browser [1] and I'm guessing Oracle had no interest in providing free work in a secure solution. So they got eliminated.

[1]: https://blog.chromium.org/2013/09/saying-goodbye-to-our-old-...

txdv 2 days ago

It compiles to JavaScript and not wasm AFAIK

apignotti 2 days ago

The target of the JIT compiler is indeed JavaScript, since WasmGC is still too limited.

This is fundamentally an implementation detail though, when we adopt WasmGC there will be no user visible change beside a potential performance improvement

dunham 2 days ago

How do you deal with numbers? Javascript doesn't do 64-bit numbers and naively multiplying 32-bit numbers can loose lower bits. If I remember right GWT used two numbers to represent 64-bit and ignored the 32-bit issue.

apignotti 1 day ago

BigInts are the current solution. There are other solutions as well.

txdv 2 days ago

Can you point out the limitations?