Paradoxically, instead of using a browser, he uses the wasm binary toolkit to run code more like a standard assembler. And wasm — what most people call WebAssembly — isn’t like most assemblers you know. Instead of labels, there are blocks that work much more like high-level language constructs such as while loops in C.
If you were expecting the Doom port to be a trip through emscripten, you’ll be disappointed. The fourth installment ports the Doom code directly and that’s very educational. There’s a lot to be done, and most of the steps stay on the regular platform to ease debugging. The switch to browser hosting occurs only at the end.
The first step was to remove some features. Things such as X11 shared memory make sense because you aren’t going to use X11. However, we were sad to see the sound code taken out. At some point, the code has to make the jump to browser output and then you are blind until you get it working.
A lot of missing functions were written using Rust and borrowed from musl, a C library implementation. There’s a lot of debugging, documented as GitHub check-ins. But it does work. Don’t believe it? Try it.