A whole computer in one HTML file.
The program on the screen is C source code. A C compiler written from scratch turns it into RISC-V machine code, and a CPU emulator written from scratch executes it, one instruction at a time. No server, no WebAssembly, no libraries. Change the code and press Run.
Lexer, preprocessor, recursive-descent parser, type checker and a RISC-V code generator. Structs by value, function pointers, floats, switch, macros, a register allocator. Checked against GCC: the same programs must print the same output.
Turns the compiler's text output into real RV32IMF machine code, with labels, pseudo-instructions and branch relaxation. Its encodings match LLVM's assembler bit for bit.
A 32-bit RISC-V core with integer multiply/divide and single-precision floats, 16 MB of RAM, a 320×240 framebuffer, a four-voice sound chip and six system calls. It also runs binaries built by Clang.
A ray-cast maze game, a path tracer, a z-buffered 3D rasteriser, demo effects, a falling-sand toy and a sequencer. Each is one C file you can read and edit in the Source tab.