8 ms·
It executes (sandboxed) native code directly, instead of requiring JIT compilation to native.
by smitherfield 9y ago
It executes (sandboxed) native code directly, instead of requiring JIT compilation to native.
- Houshalter 9y agoBut that wouldn't be portable to other architectures though. Webasm is supposed to run on anything a modern browser can run on. I think it would also be much harder to guarantee that's secure.
- traverseda 9y agoHave you seen the "the birth and death of javascript"? More interestingly it could vastly reduce the cost of interprocess communication to the point where the idea of a process starts to look a bit weird. Want to query a database? Upload a function you wrote yourself for complicated queries like GIS, or let the SQL parser generate the raw wasm on your behalf. Want to authenticate your users, but don't want to deal with all the different permiations on hardare tokens, ssh keys, etc? Just let them upload a wasm function.
- willvarfar 9y agocough java was supposed to do all that, right?
- etatoby 9y agoYes, this is my feeling too: Java all over again
- traverseda 9y agoIt seems like a lot of people were simply unwilling to support java. Bundling the execution enviroment with such an un-fun language was probably a mistake. Not to mention the patents and oracle in general. It was before my time, but I don't imagine the open source community was ever going to really embace it.
- hashhar 9y agoThat won't be platform independent though I think. WebAsm can run on ARM as well as x86 and even PPC.
- willvarfar 9y agoThe p in pNaCL stands for "portable". The basic tech behind it is LLVM IR, which is the same tech Apple Store now uses to target the Watch and future devices.
- Houshalter 9y agoSo if I understand correct, they didn't like LLVM because it wasn't really designed for this purpose. Webasm has some advantages over it like being designed from the ground up to be a secure sandbox and fit in with existing javascript JITs. LLVM also isn't a fixed open standard and doesn't guarantee backwards compatibility (I think.) You can also compile LLVM code to webasm even today, so it isn't that much of an issue. But this is just my impression to listening to some talks by the developers of webasm.
- willvarfar 9y agoI work on off-tree LLVM and have been following NaCL from the beginning. I think it's mostly nobody wanted to adopt googles solution or even admit that browsers needed sandboxing. Hell, Firefox only recently got serious about putting different sites in different processes. It took them years to accept they needed a pNaCL, and by then they couldn't really stomach using something already tried and tested by political opponents. Browsers and LLVM are both too political.
- AgentME 9y agoSupporting pNaCL and whether or not the browser's own code is sandboxed seem like very different issues; I'm not sure why you're conflating them. >Hell, Firefox only recently got serious about putting different sites in different processes. A multi-process architecture is a huge thing to try to bolt on later, and Firefox was also held back because many of its add-on APIs were incompatible with a multi-process architecture. They are finally making progress at least.