1. Meikel Brandmeyer
  2. clojuresque


Clone wiki

clojuresque / AOT_Compilation

AOT Compilation

Clojure can be AOT compiled. In general this not required and in fact it can be harmful. AOT compiled code is tied to a certain version of Clojure. So you can't mix AOT compiled libraries which were compiled with different versions of Clojure.

Nevertheless, AOT compilation can be quite useful and sometimes even necessary. It may happen that your target platform does not allow dynamic byte code generation. Then you have to AOT compile your code. Or you have to use gen-class. Then again you have to use AOT compilation.

clojuresque normally does not AOT compile your project for the above mentioned reasons. However, you can simply tell it, that you want AOT compilation and it will happily do so.

aotCompile = true