Feb 20, 2026
From 308MB to 41MB: shrinking a GraalVM native image
A short, practical recipe for getting smaller Clojure native binaries with
GraalVM native-image. Prompted by ongoing work building Ro, a local-first work system
with web, CLI and TUI interfaces.
These are the biggest levers I found doing this work initially. There are many other config flags and approaches to take to bring this down further, and I will likely explore them more as the project matures.
Baseline observation building a native image of the project on macOS:
ls -lh ~/.local/bin/ro
# -rwxr-xr-x ... 308M ... ~/.local/bin/ro
Goal: reduce size without breaking runtime behavior.