For this case, where the entire application is WASM you could get benefits if you for some reason have a malicious dependency. Instead of it being able to run with full user permissions, it will be limited by the interface offered.
"Everything Old is New Again: Binary Security of WebAssembly"
https://www.usenix.org/conference/usenixsecurity20/presentat...
Just one of the papers slowly coming up on USENIX and other security related conferences.
Want a proper sandbox outside the browser?
Use OS processes, containers and OS IPC.
Yes currently lacking ASLR and read-only memory sites increase some risks, but strongly typed function pointers, control flow restricted to function entry points and call stack isolation more than make up for it
Also I explicitly mentioned that is the first paper of many others, that are starting to appear on cyber security conferences.
For my bonafides, this is me discussing this class of vulnerabilities 8 years ago: https://groups.google.com/g/emscripten-discuss/c/gGjklbJiX1c...
Containers solve this problem to a degree, but running GUIs or plugins within them is non-trivial for end users.
The OS's themselves offer sandboxing, not the app platform. Mac has a locked down permissioning system and Windows has App Containers. Linux has a few sandboxing options available, like flatpak
I would not like to run stuff with an implicit permission to read my browsing history and all the ssh keys.
I'm not joking, no...
In that case: or transpile to Go. Just as cross-platform, but native binaries, fast build, and probably simpler code-gen. Still get GC, still get a fine ecosystem & stdlib, still can make wasm from the generated Go code, still can use boxing/unboxing (`any` instead of `object`) if the source lang is not-statically-typed.
Unless you have C deps or "native GUI" needs (ie. C deps) of course =)
If you don't have an answer you can help us all not replying
This is the JVM but using WASM as bytecode, which is to say it is yet another WASM interpreter but this one provides a runtime with a canvas.