WASI and JVM - OS Abstraction

820 Views Asked by At

My question is if the JVM actually provides a virtual operating system too, similar to how WASI does.

As for my understand WASM and JVM are both virtual machines, providing an environment to execute some bytecode. Their aim is to abstract the machine layer, thus CPU (architecture) and its' ISA.

WASM itself has no access to other system resources (fs, networking, ...) because of it's sandbox design. That's where WASI, as an extension to WASM, provides an abstract operating system layer, so that system resources can be accessed.

For Java applications, I can use native (Java) APIs, such as java.io/java.nio or java.net, directly on the JVM.

I understand that both approaches handle security differently. E.g. I do not need to provide access to a file myself to a Java application, but as with WASI I do need to. My question is rather if they conceptually provide similar levels of abstractions in case of the OS.

source to WASI: https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

EDIT: We continued discussing in the WASI repository. https://github.com/WebAssembly/WASI/issues/439

0

There are 0 best solutions below