this is very impressive, how is this done? the executable is only a few hundred KB and it runs for me, wasm is doing the magic here but I don't know too much about how the process works.

I added -I/usr/include/SDL2 to build.sh, made sure wasm-ld is in place, and it builds and runs smoothly.

It's a simple software rasterizer. If you're interested in writing your own, I've written a tutorial explaining the basics. https://magcius.github.io/xplain/article/rast1.html

Also look at the source for original Quake (https://github.com/id-Software/Quake), one of the last pure software-rasterizing AAA 3D PC games. Michael Abrash's Graphics Programming Black Book (https://github.com/jagregory/abrash-black-book) explains many of the critical parts of the rendering pipeline.

By the way, quake.exe for DOS was 404,480 bytes.