'Newt's Bunker' in 3D purple text on a wavey blue background
Cinnamoroll peaking their head with a blinking heart next to a 'Cinnamoroll' title card. Pixel art rendition of Lucario next to a 'Lucario' title card Pixel art rendition of Eevee next to an 'Eevee' title card on a blinking pink background 'Raichu' title card surrounded two Raichus 'RAWR RAWR RAWR' blinking pink 'Born to be silly' in rainbow strobing text 'im too silly!' on a pink background next to a bouncing Kirby 'HALF-LIFE FAN' in orange text on a black background with the 'a' in 'HALF' represented with a lambda symbol. 'TERRARIA PLAYER' on a Terraria styled sky background next to the Eye of Cthulu 'Computer Nerd' on a blinking blue background surrounded by two computers with monitors displaying randomly colored noise. 'I DREAM IN VECTORS,' the text is alternating between 'I DREAM' and 'IN VECTORS.' The background is strobing between a rainbow of colors. 'I love my computer <3' in pink text on a pink background next to a blinking pink computer. 'Math Nerd' on a blinking blue and white background 'Creative' on a blinking pink and white background. A pixel art bear holding an artist's palette is on the left, and a larger pixel art artist's palette is on the right. 'Anti-social' on a blinking white, blue, and black background ':3 XD :p B) :V O_O' show up in sequence followed by 'I SUPPORT EMOTICONS'
Ness as a dog or cat-like fursona, wearing a red T-shirt, a green sweater, and flip-flops. Pink text below her says 'I like computers :3'. Ness is hugging her whole PC setup in her arms, display, keyboard, mouse, and PC included. She's surrounded by two pink hearts.
home > blog > New project! Writing a C Compiler

New project! Writing a C Compiler

Hey girlies and boyos!! Now that I’ve slowly started to return from a break I’ve been taking from Discord for the past few months, I’m going to (attempt) to start writing updates for projects I’m working on! First off…

Writing my own compiler for (a subset of) C!

What’s a compiler?

Programmers write computer programs using a well-defined, human-readable, human-understandable programming language. However, computers don’t actually know how to run the code the human writes! Computers understand machine code, a type of computer language that the computer can actually run. A compiler is a computer program that translates from a program written in a human-readable programming language to machine code.

The crustydrageon C Compiler

I’m writing my own compiler! You can check it out at newtbytes/crustydrageon on GitHub. I tried this a couple months ago, but that quickly became a much, much larger project, which was too ambitious and ultimately didn’t turn out too well. For this project, I’m reducing the scope of this project quite a bit compared to that project.

The name, crustydrageon, comes from a couple things. It’s a C compiler, it’s written in Rust, and unlike my previous compiler project, it’s supposed to be something I actually finish and less focused on condensing all of my visions for the future of compilers into one project (so it’s ‘crusty’ and realistic). The drageon bit comes from the fact that dragons are a common motif in compilers because of the textbook Compilers: Principles, Techniques, and Tools. Also, the mascot of the LLVM compiler infrastructure is a dragon! The ‘eon’ part comes from me trying to make it a bit quirkier, inspired by the ‘eon’ suffix of the names of the eeveelution Pokémons (Flareon, Sylveon, Vaporeon, etc.).

Anyways I hope people think that’s neat! That’s all for now!! :3333

Back to top