Zig Builds Are Getting Faster

· coding devtools · Source ↗

TLDR

  • Zig 0.15.1 delivers measurable, real-world build time reductions for Ghostty across every build scenario, before incremental compilation even lands.

Key Takeaways

  • Build script compilation dropped from 7.2s (Zig 0.14) to 1.7s (Zig 0.15), a 4x speedup paid on every cold source build.
  • Full uncached Ghostty binary build fell from 41s to 32s, with most code still going through LLVM.
  • Incremental Ghostty executable rebuild dropped from 19s to 16s; still LLVM-backed, so further gains are expected.
  • libghostty-vt incremental rebuild (self-hosted x86_64 backend, no LLVM) fell from 2.9s to under 1s.
  • Incremental compilation is not yet functional; once it ships, Mitchell Hashimoto expects millisecond-range incremental builds.

Why It Matters

  • The self-hosted x86_64 backend is already default for debug builds; the aarch64 backend is close, signaling production readiness within months.
  • Ghostty cannot yet fully link with the self-hosted backend, so current numbers represent a floor, not a ceiling, for improvement.
  • Sub-second rebuilds for a non-trivial library are enough to eliminate context-switching between builds, a concrete workflow change now, not a roadmap promise.

Mitchell Hashimoto · 2025-10-03 · Read the original