2 ms·
> JVM and WASM [sic] is that the JVM doesn’t have untyped linear memory like WASM does. As you say, it can be trivially emulated, no reason that linear memory
by sitkack 4y ago
> JVM and WASM [sic] is that the JVM doesn’t have untyped linear memory
like WASM does.
As you say, it can be trivially emulated, no reason that linear memory couldn't be implemented on the JVM using an array of primitive (char,int,long).
The Wasm VM is more generic and has a better capabilities security model than the JVM. Had the JVM been more like Wasm (signed and unsigned primitives, capabilities model), it would have been a natural compilation target for sandboxing native code.
As Wasm gets more features it becomes more like the JVM (GC, reference types, component model). Eventually Wasm will subsume all the features that differentiates them.