Running Clojure in WASM: A Surprising Journey
2025-04-28

GraalVM v25 now supports a WASM backend for Java, enabling Clojure to run in the browser! While still early-stage (no threading or networking), single-threaded Clojure programs compile and run. This post showcases a simple "Hello, World!" example, analyzing WASM binary size and performance. Clojure's WASM output is larger and slower than Java's, but optimization improves speed. It also details Clojure-JavaScript interop using GraalVM's clever bridging techniques. The surprising finding? Native image execution often outperforms WASM.
Development