fotcorn c-compiler .cursorrules file for C

This is a self hosting (aspiring for now) c compiler written in c.
It compiles C code to x86-64 assembly, and then uses an external assembler and linker.
Because its self hosting, some constructs are not supported and should NOT be used when generating code:
no switch/case, no compound assignment, no macros apart from define, no for loop, no do-while loops.

The compiler can be built by running "ninja" in the build directory.
Tests are written using lit in the test directory. They can be run with "lit -v test/" in the build directory.
c
cmake
python

First Time Repository

A C compiler written in C by Claude and o1-preview, and also me.

C

Languages:

C: 75.0KB
CMake: 0.5KB
Python: 0.5KB
Created: 11/19/2024
Updated: 1/15/2025

All Repositories (1)

A C compiler written in C by Claude and o1-preview, and also me.