News for hackers. Stuff that matters.
Re:WebAssembly and Back Again: Fine-Grained Sandboxing in Fi... by Deukhoofd on Monday December 06, 2021 @09:26AM (#29460063)
So if I'm understanding this correctly, Firefox compiles its dependencies as WASM, effectively blocking function calls to things it shouldn't and illegal memory access, and then translates it back to C so it can compile it normally? Sounds neat!
Re:WebAssembly and Back Again: Fine-Grained Sandboxing in Fi... by fyrn- on Monday December 06, 2021 @02:42PM (#29464571)
Not back into C, from WASM to native executable / asm / object code
Re:WebAssembly and Back Again: Fine-Grained Sandboxing in Fi... by bholley on Monday December 06, 2021 @03:09PM (#29464929)
Deukhoofd is correct — we compile the WASM code back into C in order to reuse and reduce friction with our existing compilation pipeline.
Re:WebAssembly and Back Again: Fine-Grained Sandboxing in Fi... by wfh on Tuesday December 07, 2021 @10:43AM (#29473644)
Re:WebAssembly and Back Again: Fine-Grained Sandboxing in Fi... by flohofwoe on Monday December 06, 2021 @03:44PM (#29465428)
The solution described in the post actually translates C/C++ to WASM, and then translates the WASM bytecode back to C (via a tool called wasm2c), which is then fed back into the C compiler again to compile to native code, all 'offline' in the Firefox build process.
Re:WebAssembly and Back Again: Fine-Grained Sandboxing in Fi... by Hendrikto on Monday December 06, 2021 @03:34PM (#29465266)
That was only for the prototype, the current implementation is:

source code -> WASM -> C -> native code