Trying to write a C11 c compiler in rust (actively working on)

#1

Hey guys, I just learned how to write some rust code, and I felt like this language is what I like, so I decide to write a c compiler to practice my rust skill. I spent a week to learn rust and at the meantime try to use it to write my own c compiler.

Now I just finished several fundamental parts, it can now compile simple c program and generate x86-64 assembly code.

I felt it was interesting to write compiler and using rust, but cause I used to be an algorithm competitor, I’m good at writing short tricky code, but now I’m not good at writing big project.

Here’s the project link: https://github.com/onehr/crust, so if you have interests and want to contribute or help me, I would be really grateful. I will try to implement all C11 features, and maybe some advanced parts like analyzer, IR generator, simple optimizations just for FUN.

2 Likes