by matei_radu · 4y ago · 0 comments
* define a VM, but not offer a public direct API
* define a language that could be interpreted, compiled or JIT-compiled to the VM
* implement the VM so that it could run standalone or in browsers
* claim "write once, run anywhere"
The WASM model appears to be almost identical, with the addition of: * offer compilation/translation from common existing languages
Why should we prefer the WASM/WASI model to Java? Why should we believe it will be more successful?And perhaps more deeply, re-wrapping system APIs (e.g. POSIX) in WASM-specific modules seems incredibly time-inefficient (all those commitees, all that reimplemenation...). What if anything is going to be done to provide WASM/WASI with direct system access (outside the browser) ?
Maybe the real reason has to do with security, then? That was the justification for removing Java support from browsers, leaving the door open for WASM to take its place.
When instantiating a module, it can use module imports [1], which can be used to access the DOM through JavaScript calls.
[1]: https://webassembly.github.io/spec/core/syntax/modules.html#...