I decided to spend a few hours and write a simple toy emulator for the RISC-V CPU architecture. This is of course mostly for fun: I just imagined it would be cool to compile a C program with an off-the-shelf compiler and run it on your own virtual CPU.