releases 2026-11-20

The CLI now inlines small fns into their callers, and protocol and var calls cost a lot less. With tracing off (the new --no-trace flag, or JOLT_TRACE=0), code compiled by jolt run splices a small fn’s body into its callers. A check that the fn’s var still holds the same body is used as a guard, so with-redefs, alter-var-root or a redefinition at the REPL falls back to a real call. A loop calling a small clamp fn takes about half as long. JOLT_GUARDED_INLINE=0 turns this off, and using --no-trace builds an untraced binary. A protocol call on a record or deftype is now a single vector read. Each protocol method gets a fixnum id, and a type keeps its implementations in a vector indexed by that id. A call site reads the slot inline and calls the implementation directly. A protocol call on a deftype now costs about 1.65x a plain fn call. sun.misc.Signal handlers have been added. (`Signal/handle` (Signal. "USR2") handler) runs the handler on a daemon thread like the JVM, returns the previous handler, and supports Signal/raise. A kernel patch relays the signal through a pipe to a jolt thread, so the handler runs no matter which thread the kernel interrupted. Handlers for INT, TERM or HUP replace the default shutdown. jsonista.core and bencode.core are bundled. (require 'jsonista.core) used to fail on (ObjectMapper.). The bundled namespace implements jsonista’s API over clojure.data.json, with output matching jsonista on the JVM, so Muuntaja and Reitit’s default formats now load. FFI callbacks can now take and return C structs by value. foreign-callable, callback and export! accept [:by-value [:struct ...]] for arguments and for the result, matching what foreign-fn to facilitate using libraries like libghostty-vt. The new jolt.ffi/pointer-fn calls a C function through a raw pointer. The printer now streams. pr, prn, print and print-method write into the target Writer as they walk the value instead of building the whole string first. pr to a file is now as fast as spit of pr-str, and printing a large value no longer holds its whole text in memory. Threads waiting on a contended ReentrantLock or locking monitor no longer all wake on every release. Cases like futures appending to a file under a shared lock are now around 5x faster. Scripts can tell the difference between being run from being loaded. Running a file sets the jolt.file system property, so (when (= *file* (System/getProperty "jolt.file")) (-main)) can guard an entry point. jolt -M -i also works now. Several concurrency bugs got fixed: • On arm64, a multimethod could keep answering with a method it had replaced. • A direct-linked call could race a redefinition of its var. • core.async now handles a pending put on a closing channel same as the JVM, so that the put stays queued until a take consumes it. There are a few other improvements as well, such alength being about 4.5x faster, = on two different characters about 3.7x, the unchecked-*-int ops 3 to 8x, and try and binding are open-coded. jolt.host/all-classes lists every class jolt knows, and load-time-value has been adopted from Common Lisp. Upgrade notes • Make now always uses a patched Chez when building from source. It no longer picks up a Chez on PATH. Unless CHEZ= names one, it downloads Chez 10.4.1, applies jolt’s patches and builds it once. JOLT_SYSTEM_CHEZ is gone. On Windows, pass a patched Chez as CHEZ=. • Redefining a protocol or type now follows the JVM. Instances made before a deftype/`defrecord` is re-evaluated are not instance? of the new class. Re-evaluating a defprotocol drops the inline impls of types defined before it, until those types are defined again. • A protocol call on a type that implements the protocol in its own body (`deftype`, defrecord, reify) ignores with-redefs and alter-var-root of the protocol fn matching the JVM. Tests that mock a protocol method that way now need another approach. • clojure.test now prints the JVM’s report format, and run-tests on a namespace that doesn’t exist throws instead of passing with no tests.