Emscripten is a compiler toolchain that takes C/C++ code and compiles it to WebAssembly, so it can run inside a web browser at close to native speed. It’s what I used to port Commander Keen — specifically the open-source Chocolate Keen source port — into something playable directly in a browser tab.
The original plan was to refactor the whole codebase around Emscripten’s cooperative main-loop model, but that turned out to be more effort than it was worth. What actually shipped uses Emscripten’s Emterpreter instead — slower, but a working solution without a full rewrite. Getting graphics on screen alongside it meant learning SDL, which Emscripten has built-in support for.