Emscripten is annoying to port things to: one of its biggest limitations is that you can't use any mainloops (the infinite loops a game puts itself in so it runs indefinitely), but Cave Story's engine *heavily* relies on them. On the upside, Emscripten supports SDL2, so I didn't have to rewrite any of the existing backend code.