2 ms·
That's a good article! Some notes on it: https://twitter.com/kripken/status/1284576787624648705 https://twitter.com/kripken/status/1284576787624648705 Perhaps
by azakai 6y ago
That's a good article! Some notes on it:
https://twitter.com/kripken/status/1284576787624648705 https://twitter.com/kripken/status/1284576787624648705
Perhaps wasm isn't (yet) a good replacement for native binaries for the reasons they mention. In particular such an application usually has access to files and timing etc., and you're (currently) missing some safety techniques native binaries use, which is a risky combination.
But as mentioned in the post here, if you're sandboxing a specific library that does pure computation (say, a codec or a compression library) then using wasm you can make sure it cannot escape the sandbox and that it has no timing or other OS capabilities. Those are powerful guarantees!
- pjmlp 6y agoPure computation is subject to UB and memory corruption due to lacks of bounds checking inside linear memory blocks, leading to outputs that cannot be trusted, even though they are sandboxed.
- azakai 6y agoDefinitely, yes, and you do need to be careful about those outputs. Still, the sandboxing guarantee here is very useful! This isn't theoretical, Firefox does this approach in production (using RLBox, which is mentioned in the post), https://hacks.mozilla.org/2020/02/securing-firefox-with-webassembly/ https://hacks.mozilla.org/2020/02/securing-firefox-with-weba...
- pjmlp 6y agoThanks for the link, I missed that post.