ALL INTELLIGENCE
Hacker News AIT2·Open Source

Jolt Brings Native C FFI and Standalone Binaries to Clojure

Original title: Jolt – Clojure that speaks C
58AI Score

Jolt is a self-hosted Clojure compiler that lowers code to a host-neutral IR and emits Scheme, running natively on Chez or compiled to JavaScript via Gambit. It offers native C FFI, ahead-of-time builds into self-contained binaries without the JVM, and real OS-thread concurrency with persistent data structures.

Full Report

Contents7 sections

Why Jolt?

Native C FFI

Bind any C shared library: declare it, wrap functions with defcfn, call them with Clojure values. The db library reaches SQLite and Postgres this way; http-client binds OpenSSL and zlib.

Standalone Binaries

jolt build ahead-of-time compiles a project (runtime, standard library, app, and its deps) into a single self-contained executable, with C dependencies linked statically. No Chez, no JVM, no source needed to run it.

Self-Hosted Compiler

Reads Clojure, analyzes it to a host-neutral IR, emits Scheme, and runs it: on Chez natively, or on Gambit compiled to JavaScript. The compiler is written in Clojure and compiles itself; Chez runs interpreted and compiled code identically, so the REPL and a built binary behave the same.

Real Concurrency

future/promise/agent/pmap run on OS threads over a shared heap, matching JVM semantics. core.async provides channels and go blocks.

Persistent Data Structures

Immutable vectors (32-way tries), cons lists, and HAMT maps/sets with Clojure value semantics. Transients are real mutable scratch collections.

Clojure-Compatible

Lazy/infinite seqs, transducers, destructuring, multimethods, protocols/records, metadata, namespaces, runtime eval, and the full reader.