(iterate think thoughts): Jolt: running Clojure on Chez Scheme
(iterate
think
thoughts)
Theme
July 2, 2026
Jolt: running Clojure on Chez Scheme
I've been working on a new Clojure implementation targeting Chez Scheme, and it's now at a point where I'd like to share it more broadly in hopes that it might be useful to others. This post will explain the rationale behind the project, its current status, and why it may be of interest.<br>Why Chez Scheme?<br>My main goal was to make a drop-in replacement for JVM Clojure which had a fast startup and a light memory footprint. If you look under the hood of Jolt you'll quickly see why Chez Scheme is a great choice for hosting Clojure. Since both languages share the same Lisp roots, the core semantics of Clojure map seamlessly to Scheme, avoiding the impedance mismatch associated with forcing functional paradigms onto something like the JVM. Chez brings a mature JIT compiler to the table that can aggressively optimize the emitted code while maintaining a reasonably small runtime footprint. You also get a highly tuned generational garbage collector that is practically purpose built to handle the rapid allocation and deallocation of immutable data structures inherent to Clojure workflows. Finally, Chez runs natively across a wide variety of operating systems, so you end up getting lean native binaries with instant startup times rather than hauling around a heavy Java environment.<br>While the JVM is an incredibly powerful piece of engineering, it also happens to be one of the biggest reasons developers cite when passing on Clojure. The Java runtime evolved in an era of enterprise architecture, designed for massive application servers like Tomcat or WebSphere which were effectively their own operating systems. In that model the application server would greedily consume all available host memory and run continuously for months on end, making long JVM startup phases and heavy initial resource footprints perfectly acceptable trade-offs. But that monolithic design clashes with how modern web applications are typically built, especially in fast-paced startup environments where the engineering culture has shifted toward microservices. Today, you typically want to deploy fleets of isolated containers that boot instantly and can dynamically scale horizontally to handle sudden traffic spikes. Hauling around a massive warmed up Java environment just to run a lightweight standalone service goes directly against that principle.<br>I've always wondered what it would take to create a Clojure runtime that matched modern development practices, and Jolt is my attempt at tackling the problem. There are, of course, already a number of Clojure dialects out there. Jank, in particular, is an effort I'm personally excited to follow. It's already far along toward having a full Clojure implementation, but it focuses on having compatibility with the core language. Unfortunately, most of the existing Clojure libraries end up relying on some interop with the JVM host meaning that they will not run on these dialects without modification.<br>It would be really nice to be able to leverage the existing ecosystem of mature and battle tested libraries already available, and I was interested to see how feasible it would be to provide Java-specific shims on top of the Chez runtime. My key realization was that most libraries don't actually use much of the Java standard library surface for their interop, and once you map out a few packages like java.io, java.time, and a few others, then you can run a large portion of the current Clojure stack without having to reimplement or port it to the new platform. Again, it's worth noting other efforts such as let-go dialect targeting Go, which is following a similar plan. The key difference is in the platforms we are targeting and the ecosystems they open up access to.<br>What Works Today<br>Today, Jolt supports a number of popular Clojure libraries. It is already possible to build a fully fledged Ring app using Ring, Reitit, Selmer, and HoneySQL. The full list of libraries which have their entire test suites passing can be seen on the official documentation site. Some libraries, like Reitit, drop down to Java, but that's not a problem as Jolt makes it possible to provide shims using Jolt libraries. For example, router library implements reitit.Trie Java class needed by Reitit. So, if you need access to a particular Clojure library that doesn't have the shims available in the core language, you can always add them yourself to get them working. In many cases, this doesn't need to be done from scratch either as you can leverage mature Scheme or C libraries for the underlying functionality, and simply write a bit of glue code to expose the functionality as a Java API.<br>Jolt uses deps.edn for managing dependencies and aliases largely the same way as regular Clojure. As a bonus, you can also specify native C dependencies as seen here. These libraries must be provided on the system in...