A toy C Compiler implementation in Clojure.
Follows the book Writing a C Compiler by Nora Sandler.
Only Linux and Mac OS is supported. For Windows, run through WSL.
To see all available tasks in the project, run bb tasks
:
bb tasks
The following tasks are available:
clean Removes target folder.
run-main Run main
build-uberjar Builds uberjar
run-uberjar Run uberjar
build-native Builds native image
To build native image, run:
bb build-native
This produces a binary cljcc
at /target/cljcc
. Pass the path to the C file.
./target/cljcc/cljcc "path/to/file.c"
bb run-main "path/to/file.c"
Some talks / projects which helped in implementation.