As of ClojureScript 1.7 self compilation is now supported, see
This Post
To set up
(ns self-compile.core
(:require cljs.js))
(set! cljs.js/*eval-fn* cljs.js/js-eval)
(def state (cljs.js/empty-state))
(defn my-compiler [str-to-compile]
(cljs.js/eval-str state str-to-compile
(fn [response]
;evaluated code here
))
The initial compilation must be done on the JVM, however once this is done the function my-compiler above will compile strings. To create a sample project with up to date config use the lein mies
template
lein new mies my-project