This is compiler for the Clojure programming language that targets C as a backend.
Community and Organization
We use a Trello board to keep track of ideas, proposals, TODOs, bugs and who's doing what. If you plan to contribute, please do join the board.
Additional documentation for the project can be found at the wiki.
ClojureC includes a submodule. To fetch it, do
git submodule init git submodule update
pkg-config --cflags glib-2.0 pkg-config --cflags bdw-gc
don't report errors you should be good.
Make sure you're using Leiningen 2 - older versions of Leiningen won't work. Run the testsuite:
All tests should pass.
Note that ClojureC is still in its experimental phase, so please don't expect a polish experience, yet.
From the command line
ClojureC provides a very simple command line compiler interface. Let's say you have the following in the file
(ns cljc.user) (defn main [& args] (doseq [arg args] (pr arg "\n")))
Then if you do the following in the
lein run /tmp/echo.cljc run/cljc.c cljc.user/main cd run make
you should have a
cljc executable in the
run directory that acts a little like
From the REPL
The easiest way to play around with ClojureC interactively is in the namespace
clojurec.core-test. For example:
(core-run '(pr (+ 1 2))) => 
Mobile Platform Notes
See the README.md file in "clojurec/run/android".
See the README.md file in "clojurec/run/ios".