Babashka: A native Clojure interpreter for scripting
summary
Babashka is a single native binary that runs Clojure scripts with near-instant startup by using GraalVM native-image and a small Clojure interpreter (parser → analyzer → evaluator) instead of the JVM bytecode path. It ships many built-in namespaces, supports Java interop for java.io/Time/etc. via an explicit class-config, and extends capabilities with pods (separate binaries) for SQLite, file-watching, AWS, etc. Trade-offs: no runtime class generation or full defrecord/type fidelity, and some JVM libraries need manual native-image config.
AI-written summary · about
chapters (21)
- 0:00Introduction and naming
- 4:51What is Clojure and JVM
- 7:05Why Babashka exists
- 9:15Why learn Clojure
- 12:26How Babashka works with GraalVM
- 15:21Babashka demo and features
- 19:02Real-world Babashka scripts
- 21:34Built-in libraries and examples
- 24:23Using external libraries and pods
- 27:12Pods and RPC-like system
- 30:01Babashka in production
- 31:05Babashka architecture breakdown
- 33:32Small Clojure Interpreter
- 42:45Live coding with REPL
- 47:21Building a REPL with interpreter
- 53:06Interpreter internals
- 56:21Babashka runtime limitations
- 1:00:01Challenges and limitations
- 1:03:15Working with JDBC and databases
- 1:07:14GraalVM configuration tips
- 1:10:07Q&A and closing
