Jolt: A Self-Hosted Clojure Compiler That Targets Scheme
Jolt is a self-hosted Clojure compiler that emits Scheme, runs on Chez or Gambit, and produces standalone binaries — no JVM required. It brings real concurrency, persistent data structures, and Clojure semantics to a new runtime.
Jolt is a new compiler that takes Clojure source, analyzes it into a host-neutral IR, and emits Scheme. It runs natively on Chez Scheme, or on Gambit when compiled to JavaScript. The compiler itself is written in Clojure and compiles itself — a self-hosting design that proves its own maturity.
The headline feature is jolt build, which ahead-of-time compiles a project — runtime, standard library, app, and dependencies — into a single self-contained executable. No Chez, no JVM, no source needed to run it. That's a significant departure from the traditional Clojure deployment story, which typically requires a JVM and a classpath.
Concurrency is handled with OS threads over a shared heap, matching JVM semantics for future, promise, agent, and pmap. core.async provides channels and go blocks, so Clojure's async model carries over.
The numeric tower is fully implemented: exact integers, bignums, exact ratios, and flonum doubles. = is category-aware, while == compares values across categories. Persistent data structures include 32-way tries for vectors, cons lists, and HAMT maps/sets with Clojure value semantics. Transients are real mutable scratch collections.
Clojure compatibility is broad: lazy/infinite seqs, transducers, destructuring, multimethods, protocols/records, metadata, namespaces, runtime eval, and the full reader. This is not a toy subset — it's aiming for real-world Clojure code.
Jolt is an ambitious project that could reshape how Clojure is deployed, especially for those who want Clojure's expressiveness without the JVM's overhead. It's worth watching for anyone invested in the Clojure ecosystem.
No Chez, no JVM, no source needed to run it — Jolt's ahead-of-time compilation produces a single self-contained executable.
| Feature | Jolt | Clojure (JVM) |
|---|---|---|
| Runtime | Chez Scheme / Gambit (JS) | JVM |
| Binary output | Standalone executable | JAR + JVM required |
| Concurrency | OS threads, shared heap | JVM threads, shared heap |
| Persistent data | 32-way tries, HAMT | PersistentHashMap, etc. |
| Ecosystem | Limited, growing | Mature, extensive |
Discussion
0 Comments
Be the first to start the discussion.