Quoting:
"Mozilla this week announced a project called WASI (WebAssembly System Interface) to standardize how WebAssembly code interacts with operating systems. If the project succeeds, it will do what Oracle's Java Virtual Machine does, but better and more broadly.
WebAssembly, or WASM, is a binary format for a virtual machine that can run across multiple hardware architectures. WASM code can be produced from various programming languages like C/C++, Go, and Rust as a compilation target.
WebAssembly has been adopted by all the major web browsers, but it doesn't yet have a standard way to run outside the browser. That's where WASI comes in.
"Code outside of a browser needs a way to talk to the system – a system interface," explains Mozilla software engineer Lin Clark in a blog post. "And the WebAssembly platform doesn’t have that yet."
What's up with WASM?
With WASI, WASM code will be able run in the browser or any compliant environment, allowing language agnostic, cross-platform application deployment. Where Portable Operating System Interface (POSIX) provides a way to make source code portable across Unix-like operating systems, WASI aims to make compiled binaries portable across devices and operating systems. It promises a universal runtime that runs at near-native speed.
The Java Virtual Machine (JVM) serves the same purpose but you can't run Java code in a browser without a plugin. And while the language flexibility offered by the WebAssembly platform may be achievable in Java via the GraalVM, the Java ecosystem, open though it may be, still stands in the shadow of Oracle and its claims on Java-related IP.
WASM, being memory safe and tuned for validation, also has security advantages over Java applets, though it still may be vulnerable to control flow hijacking. It also plays nicer with languages like C/C++ and Rust."