Clojure, without the JVM.
cljrs is a Clojure dialect implemented from scratch in Rust.
The reader, evaluator, macros, and persistent collections run as a
tree walker. Type-hinted functions compile to native code through
MLIR and LLVM. GPU kernels compile to WGSL and run on Metal, Vulkan,
DX12, or WebGPU.
One language, three compilers
;; Tree walker. Fully dynamic, lowest ceremony.
(defn avg [xs] (/ (reduce + xs) (count xs)))
;; Native. Same syntax, type-hinted, JIT-compiled to machine code.
(defn-native fib ^i64 [^i64 n]
(if (< n 2) n (+ (fib (- n 1)) (fib (- n 2)))))
;; GPU. Same syntax, compiles to a compute shader.
(defn-gpu doubled ^f32 [^i32 i ^f32 v]
(* v 2.0))
Run it
click Run
Status
- Tree walker, macros, persistent collections, destructuring, atoms, try/catch.
clojure.core405/662, plus 100% ofclojure.string,clojure.set,clojure.walk,clojure.edn. See Coverage. - Native code path: 2.4x to 13x faster than Clojure on JVM on fib, loop_sum, cond_chain (as of 2026-04-16). See Benchmarks.
- GPU path: cljrs kernels run natively on Metal/Vulkan/DX12 and in the browser on WebGPU.
- Rust-crate interop via opaque handles — rapier2d/3d bindings ship as Physics.
- 21 CPU demos, 7 GPU demos, all live-coded. See Demos.
- Live matmul benchmark vs numpy/JAX/PyTorch references — Matmul bench.
- New: edit Conway's Game of Life rules live without losing the simulation.