Piru

(Formerly known as Silverquill)

Source Code

The way this project came about is kind of funny. When I was doing my internship at NSHC in the summer of 2025, I was tasked with reading and creating a presentation on the Tiny C compiler by Fabrice Bellard. Perhaps because of the language barrier, I had misinterpreted this as being to write a very simple compiler. I had gotten as far as writing a lexer and parser using a tutorial by Kuter Daniel before the misunderstanding had been cleared up.

The compiler targets the RV64I instruction set for portability. The idea is that the compiled code will run in a virtual machine that executes the RISC-V instructions so that only the VM, not the runtime code, has to be recompiled for new platforms. This virtual machine is, of course, part of the project. As a part of preparing to write this project, I followed a tutorial by Justin Meiners and Ryan Pendleton detailing how to write a simple LC-3 virtual machine, and the RV64I VM would be based on that.

I intend to come back to this, but as of writing this, my university capstone project is taking up a lot of my time.