News for hackers. Stuff that matters.
Re:WebAssembly and Back Again: Fine-Grained Sandboxing in Fi... by bholley on Monday December 06, 2021 @12:10PM (#29462432)
Beyond the reasons others have mentioned, another key issue is that this isn't a transparent transformation. The sandboxed code can only access memory within a restricted subregion, which often requires some small code changes on both sides of the boundary (for example, copying input data into that memory region so that sandboxed code can operate on it).

So implementing this in the compiler would entail some fairly involved handshaking between the code and the compiler beyond the normal scope of C/C++. Doing this in a library instead — and leaning on a well-understood and well-studied execution model — makes everything a bit more natural to work with.

There are no comments on this comment yet.