compilers A field note by Vikrant Sharma
Someone built a C compiler with an LLM for $100 and it boots Linux
A solo dev used an LLM as a pair programmer to write a C compiler from scratch. It compiles itself and boots the Linux kernel. Total AI budget: $100.
Someone just built a working C compiler using an LLM as a co-pilot. Not a toy compiler. This thing compiles itself, passes most of the C test suite, and boots the Linux kernel. The entire AI budget was $100 per month. The repo is called kcc. It is written in C, implements a preprocessor, lexer, parser, and x86-64 code generator. The developer used the LLM to write chunks of code, explain edge cases in the C spec, and debug segfaults. The commit history shows they worked through each phase methodically: tokenisation first, then parsing, then code generation. The interesting bit is not that LLMs can write compilers. We knew that. The interesting bit is the cost. A hundred dollars per month of API calls got someone from zero compiler knowledge to a self-hosting C compiler that runs real-world code. That is absurdly cheap for what used to require a computer science degree and six months of reading Dragon Book. The kernel boots. That means kcc handles inline assembly, preprocessor macros, struct padding rules, all the cursed parts of C that break toy compilers. The test suite shows 80 percent pass rate on standard compliance tests. Not production-ready, but closer than most solo hobby compilers ever get. This is what accessible tooling looks like. A solo developer with a credit card and curiosity can now build infrastructure-level software. The LLM does not replace understanding, it compresses the feedback loop. You still need to know what a compiler does, but you do not need to memorise every x86 instruction encoding. I want to see the prompt log. How many times did the LLM hallucinate a register name? How often did the developer have to rewrite generated code because it was subtly wrong? The repo does not include that, which is a shame. The messiness is the interesting part.
Source: Kcc, a C compiler built solo with an LLM on $100/month boot Linux kernel