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

From: Ian Eure <[email-masked]>
Date: Tue, 8 Apr 2025 12:57:20 -0700

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.

 gnu/packages/gnuzilla.scm |  30 +++++++++
 gnu/packages/wasm.scm     | 135 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 165 insertions(+)
 create mode 100644 gnu/packages/wasm.scm

-- 
2.49.0