📦 Emscripten in Apptainer – Reproducible WASM Builds

June 30, 2025

A pre-configured Apptainer container is now available with the latest Emscripten SDK built-in. This enables consistent, reproducible builds of WebAssembly modules from C++ code without local setup.

Proton Drive
Download: emscripten.sif (Apptainer Container)
Hosted securely on Proton Drive

After downloading the container, make it executable:

chmod +x emscripten.sif

Usage Examples

Compile:

./emscripten.sif emcc hello.cpp -o hello.js

Interactive shell:

./emscripten.sif

Enable persistent cache (recommended):


mkdir -p ~/.emscripten_cache
./emscripten.sif --bind ~/.emscripten_cache:/tmp/emscripten_cache emcc hello.cpp -o hello.js
    

This container is ideal for local development, CI pipelines, and repeatable compilation environments.

← Back to articles