A minimal compiler for a subset of C written in Rust.
- Compiler driver (gcc preprocessor, assembler, and linker)
- Minimal compiler that can return constants
- Lexer
- Parser
- Assembly generation
- Unary operators
- Binary operators
- Logical and relational operators
- Local variables
- If statements and conditional expressions
- ...
I'm building this compiler in an incremental fashion as presented in the book Writing a C Compiler by Nora Sandler, as well as the paper by Abdulaziz Ghuloum on Scheme which inspired it. Additionally, I also frequently reference implementation details from wrecc, which is also a C compiler written in Rust.