It's also an open collaborative cross-vendor specification with at least four different independent implementations.
MSIL/CIL is similar in some ways, but it's still largely only supported by Microsoft and doesn't sandbox binaries the same way. It's an inspiration to We assembly, but not a feasible alternative to it. Similar to Google's PNaCl bytecode.
Some more detail here:
https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webas...
https://hacks.mozilla.org/2019/11/announcing-the-bytecode-al... "secure-by-default foundations for native development that are portable and scalable."
https://hacks.mozilla.org/2019/11/announcing-the-bytecode-al.... "secure-by-default foundations for native development that are portable and scalable."
Likewise, they wouldn't "forget" the formats that already had support for languages like C when talking about what is "new" with WebAssembly.
That can be supported in the source language.
Solaris, iOS and future Android versions take advantage of their existence.
The fact remain that wasm module have a very well defined behavior when embedded in other applications and can be embedded in a portable way.
What you're saying is that every vendor shipped their software with source code and only used cross platform APIs. Is that right?
Just like with TIMI, MSIL, EM, ADF, TendDRA, PNaCL among others.
> What you're saying is that every vendor shipped their software with source code and only used cross platform APIs. Is that right?
Rather that this is nothing new, and the formats listed above, already offered the same capabilities, without the same marketing.
https://www.pdftron.com/blog/wasm/wasm-vs-pnacl/
And it doesn't offer any significant security improvements, in spite of its marketing, compiling Heartbleed into WASM is still possible.
I don't really see the point of using WebAssembly (or any other bytecode format) outside the browser, though. It just seems like a way to throw away performance for no benefit.
Mainframes and midrange computers have used bytecode formats since the early 60's as hardware independence mechanism, where you AOT compile at installation time, or have an hardware interpreter implemented as part of a micro-coded CPU.
It has allowed those kind of computers to advance their hardware to modern times, while keeping the applications unchanged.
The same idea is widely used on embedded platforms, as it gives OEMs flexibility designing hardware, while reducing software development costs even further.
You say that wasm is a political "bastard" born out of mozilla refusal for PNaCL. I disagree, but it is a way of looking at history.
But then my stance would be that to satisfy the w in wasm it Needs to be a political chimera, the whole web is predicated on the model of vendors fighting political and technical battles over standard. PNaCL lost that battle, Java lost miserably that battle, every other portable assembly ever never even participated.
Are you criticizing wasm or the open web?
- The original 32-bit x86 implementation fundamentally required it because, due to how it used %ss, a crash in the sandboxed code would crash the whole process. [1] Avoiding that issue would have required a different model that had performance overhead (and was more complicated). Ironically, the 64-bit version had no such requirement, but by then NaCl's design was already well-established.
- AFAIK it was originally developed separately from Chrome, so there was less motivation to deeply integrate it with JS.
- It was apparently conceived as a replacement for plugins (originally using NPAPI, before PPAPI was invented), which Chrome had run in a separate process anyway.
But WebAssembly is designed to run in the same process as DOM/JS, giving it two key advantages: it can reuse Web APIs rather than needing a whole separate set of APIs (PPAPI), and it can directly call and be called from JS. Both make life easier for developers; reusing web APIs also makes life easier for implementers.
The second key difference is that NaCl leaks much more information about the native environment than WebAssembly. Even with PNaCl, the native text segment, the native stack, and certain bits of implementation code were all accessible within the sandboxed address space. If you were up to shenanigans, you could even do things like jump into the middle of a native function, completely breaking the portability abstraction. Was that a problem? I don't know. It was conceptually secure; you couldn't break out of the sandbox without finding a vulnerability, just like WebAssembly. But it was a lot less isolated. In contrast, WebAssembly makes none of those things accessible and enforces full control flow integrity. You can't even tell which architecture you're running on, aside from indirect observations by benchmarking instructions or checking for memory ordering violations.
That difference is certainly responsible for some of the performance gap between NaCl and WebAssembly. Is it responsible for all of it? I don't know. I don't even know how big the gap is in the first place; the PDFTron benchmark makes it look major, but I haven't seen any other benchmarks, and I'm not sure if anyone has investigated what exactly is causing the overhead in the PDFTron benchmark, especially since the code isn't open source.
[1] https://static.googleusercontent.com/media/research.google.c...
That is how it has always been done and is still done.
Yes, you can do it differently with an IL, but that isn't new either (Java, .NET, etc.).
That is certainly true.
But I was answering to
> The same as from using Electron, but a step further: less overhead from unneeded browser features, ability to lock the user into a kiosk/fullscreen mode, while most of the code is still reusable.
namely _Desktop applications_
Wasmer claim is
> Use the tools you know and the languages you love. Compile everything to WebAssembly. Run it on any OS or embed it into other languages.
There's no browser involved here, just compile once, run everywhere
I have the feeling I already heard it...
>I have the feeling I already heard it...
If you are referring to java then something to note is
> Use the tools you know and the languages you love.
> Compile everything to WebAssembly.
> [..] embed it into other languages.
Which to my understanding apply only marginally to java; especially the embedding part.
Serious question: what is the common electron app business case?
Being able to run as a desktop app as well as in a browser?
The reuse developers part I suppose could be achieved with QtQuick since QML is javascript based, but beyond the language, not that much else translates and you can’t completely get away from C++ for anything non-trivial, so it’s not really an electron competitor.
Easy portability (not perfect) between all major platform
Every other GUI libraries are order of magnitude inferiors except if you just want to look like windows default utilities.