Subject: Re: [bug#77653] [PATCH 0/4] Add WASM toolchain, wasi-libc, and browser WASM sandbox support

From: Maxim Cournoyer <[email-masked]>
Date: Fri, 25 Apr 2025 22:02:45 +0900

Hi Ian,

Ian Eure <[email-masked]> writes:

> This patch series adds a Clang variant which can emit WASM; runtime support for WASM binaries; wasi-libc, a libc implementation for WASM programs; and a `wasm-sandboxed' function which creates a WASM sandboxed variant of Firefox-based browsers.
>
> In Firefox and Firefox-derived browsers, WASM sandboxing is a security technique which compiles C/C++ libraries into WASM, then translates the WASM back into native code.  This allows leveraging the WASM security model to isolate the library from the browser, without needing a separate process to contain it.  Please see this blog post for more info: https://hacks.mozilla.org/2020/02/securing-firefox-with-webassembly/
>
> The code is extracted from my personal channel[1], which in turn is based on work done for nonguix's Firefox package.  I've been daliy-driving personal variants of LibreWolf since before the package was accepted into Guix, and nonguix's Firefox has been using it even longer.
>
> [1]: https://codeberg.org/ieure/atomized-guix/src/branch/main/atomized/packages/wasm.scm
> [2]: https://gitlab.com/nonguix/nonguix/-/blob/master/nongnu/packages/wasm.scm?ref_type=heads
>
> Ian Eure (4):
>   gnu: Add wasi-libc.
>   gnu: Add wasm32-wasi-clang-runtime.
>   gnu: Add wasm32-wasi-clang.
>   gnu: Add wasm-sandboxed.

Thanks for picking it up!  Nice series.  I've left a few hopefully
useful comments.  Could you please prepare a v2 taking them into
account?

Thank you!

-- 
Maxim