3 ms·
I think if you're afraid of memory corruption inside the WASM heap, it's better to use Rust instead of C or C++. WASM's job is to prevent code inside the sandbo
by flohofwoe 5y ago
I think if you're afraid of memory corruption inside the WASM heap, it's better to use Rust instead of C or C++. WASM's job is to prevent code inside the sandbox from escaping the sandbox, not to prevent memory corruption inside the sandbox.
- pjmlp 5y ago> I think if you're afraid of memory corruption inside the WASM heap, it's better to use Rust instead of C or C++. Agreed, but as consumer from WASM modules that isn't your option to make. > WASM's job is to prevent code inside the sandbox from escaping the sandbox, not to prevent memory corruption inside the sandbox. That is not better than a typical OS process, just it happens to be randomly downloaded into my computer.
- afiori 5y agoIt is a lot better: there is a sandbox with minimal surface area compared to no sandbox at all (except for memory isolation)
- pjmlp 5y agoWhen they are finished with the WebAssembly roadmap there will be the same sandbox as a typical OS process, no different of running a ART executable on Android, bitcode on watchOS, MSIL on Windows, or TIMI on IBM i.
- afiori 5y agoOf course, that is the plan, but even then it will still be possible to run WebAssebly modules with no permissions or limited permissions, as the sandbox was always there. On the other hand I need to admit that I would have not forseen some of the more recent use cases for WebAssembly https://bytecodealliance.org/articles/making-javascript-run-fast-on-webassembly https://bytecodealliance.org/articles/making-javascript-run-... which can be reminescent of the "docker daemon running as root" issue.