In the "cool projects from a gamedev" category, Andre Weissflog has open sourced a bare bones C64 emulator written in C99 and compiled to WebAssembly in under 64k:
You can find the source code at https://github.com/floooh/chips-test/blob/sokol-app/examples/c64.c.
Try out the emulator at https://floooh.github.io/oryol-sticky-tests/c64.html.
If you're not sure what to do, here's a "BASIC" set of commands to try with the emulator:
10 PRINT "HELLO, WORLD" 20 GOTO 10 RUN
By the time I finished this post, I noticed he's also released more WebAssembly emulators, including ZX Spectrum 128 and Acorn Atom: https://floooh.github.io/tiny8bit/.