Or for that matter, the myriad of bytecode formats devised since UNCOL, like the IBM and UNISYS's language environments on their mainframes.
Can't speak to mainframe VMs, since I ain't familiar with them. It's reasonable to assume they were proprietary, though (that's how things typically were back in those days), so WASM has a leg up there.
The WASM that everyone dreams about will be the same size, if it is supposed to match in features.
Plenty of bytecode formats since have been AOT/JIT since the early 70's.
We wouldn't even be discussing WASM if Mozilla wasn't unwilling to implement PNaCL. Apparently being open source, with initial support for C, C++ and OCaml support wasn't enough.
The WASM I dream about (can't speak for anyone else) won't be a whole lot bigger than it is now [0], and I don't think anyone expects it to match the bigger VMs in features (the sheer number of features in the bigger VMs is part of the problem!).
----
[0]: It's already pretty great, IMO, and the additions I'd like to see - namely, support for multiple memories, and the handful of extra instructions necessary to support tail call optimization [0.1] and garbage collection [0.2] - ain't expected to be that huge of an addition in terms of instruction set bloat. I'm hopeful that they won't be especially complex to implement, either.
[0.1]: https://github.com/WebAssembly/tail-call/blob/master/proposa...
[0.2]: https://github.com/WebAssembly/gc/blob/master/proposals/gc/O...
As a long-time JVM user, I am curious about WASM and how it compares to the JVM and CLR.
In fact it had two versions of it, Managed C++ released in version 1.0, replaced by C++/CLI with version 2.0.
JVM has support for C-style linear memory model on its unsafe interfaces (the non-public ones), and is being improved via Graal (which understands LLVM bitcode) and Projects Panama/Valhalla.
That alone should make WASM quite different from the JVM, no?
The evolution from MaximeVM, which is now increasingly being integrated into OpenJDK as part of project Metropolis.
As for the CLR, it supports VB.NET, C++ and C# since day one, including a Common Language Specification and Common Type System.
Then alongside its history got COBOL, Eiffel, F#, Ruby, Python, Nermele, Clojure,....
IBM and UNISYS mainframes language environments support a mix of COBOL, C, C++, Fortran, RPG, NEWP, also with a common type system for interoperability.
While UNISYS documents are a bit hard to come by, IBM ones are available as RedBooks.
Graal does not have a standard binary interchange format for compiled C/Rust/etc.-style programs; it requires per-language support for them and works in terms of program source.
The CLR's C++ support is nothing like WebAssembly C++- you either FFI to native code, bypassing the VM, or you compile a limited subset of C++ to unverified bytecode- and the latter doesn't support newer language standards and is being phased out.
WebAssembly solves both of these problems- existing compilers for any unmodified language can target its standard binary interchange format the same way they would target a hardware architecture, and run within its sandbox. WebAssembly doesn't need to add support for them, or know anything about their source form.
WASM in its current form is still quite limited forcing language runtimes to bring along features that other battlefield proven solutions support out of the box.
Hardly a synonym for unmodified.
Meanwhile "must distribute a runtime with the app" does not affect the language at all, and indeed applies to these other solutions as well.
It does - LLVM bitcode.
Google tried using it for this purpose with PNaCl and it wasn't great. Apple makes it work by strictly controlling the target hardware they use it for, and with massive investment in the toolchain.
Wasm today is a toy hardly anyone uses. It can't run many real world C programs which means they'll need to be "ported" to the subset of C wasm supports. Well, if you're willing to work with that constraint you can constrain bitcode in the same way.
By the way Graals LLVM support can execute multiple bitcode versions, with seamless and fast language interop, and it virtualises execution so that e.g. a subset of x86 assembly can be cross compiled on the fly to other arch's. It's needed because so much real C doesn't target an abstract machine but real CPUs.