The State of ClojureScript Compilation in Lumo
19 Sep 2017Lumo has shipped with experimental support for compiling ClojureScript projects entirely without the JVM since the beginning of 2017. Starting with the newly released version, the Lumo build API has been greatly enhanced and much more stable! Read on for a rundown of the state of ClojureScript compilation in Lumo.
I recently gave the first public talk about Lumo at ClojuTRE in Finland (video). Meeting people who are using Lumo daily, either in their day jobs or simply to play with Clojure(Script) always does a really good job at keeping me motivated me to continue working on Lumo.
Current state of affairs
The current Lumo build API is mostly a prototype that I put together demonstrating that we could have a JVM-less ClojureScript compiler. A great number of features is lacking, and it can only compile very simple projects.
Today!
Since ClojuTRE, I've been hard at work, and today I'm proud to announce that Lumo's build API is, with one exception1, at feature parity with the ClojureScript JVM compiler.
Most notably, it also features the ability to process
JavaScript modules,
including those from NPM (in a node_modules
installation).
I encourage you to update Lumo to the newly released 1.8.0-beta2 version and try out the revamped build API. Feedback is most welcome!
The road ahead
The key to unlocking feature parity with the JVM ClojureScript compiler has been the JavaScript port of the Google Closure Compiler. Without it, neither JS module processing nor sophisticated optimizations would be possible in Lumo. However, it is also there that lies the last hurdle to truly achieving feature parity with ClojureScript on the JVM: the ability to perform code splitting and dynamic chunk loading through Google Closure modules.
In the next few months, we'll be working hard to iron out some internal details, as well as research the possibility of adding code splitting support to the Google Closure Compiler JavaScript port.
Thanks for reading!
P.S.: Lumo is built on my personal time, without the backing of a big corporation. Its development and long term sustainability rely on financial support from the community. If you or your company are using Lumo, please consider supporting the project in its OpenCollective page. We would like to thank JUXT for their recent sponsorship of Lumo.