A self-hosting compiler for a subset of C.
$ make ranc # bootstrap ranc
$ ./ranc > a.s <<EOF
void printf();
int main() {
printf("hello world\n");
return 0;
}
EOF # compile C code to assembly
$ gcc -m32 a.s # use gcc to assemble and link into binary executable
$ ./a.out # run your program
$ make test
Many ideas are borrowed from https://github.com/Fedjmike/mini-c.