December 28, 2024

...

5 min read

Ghostty released

Ghostty has been one of the most anticipated terminal emulators I remember. Over the past year, I've seen countless posts, YouTube reviews, and GitHub dotfiles featuring Ghostty configurations from early adopters in the beta program.

Now that Ghostty is officially out of beta, it’s the perfect time to take a closer look.

Who's behind Ghostty

Understanding the people behind a product often gives insight into its quality and direction. A car analogy fits well here — you'd want to know the manufacturer before committing to a vehicle.

Mitchell Hashimoto is the mastermind behind Ghostty. He is founder of HashiCorp, the company behind tools like Vagrant, Terraform, Packer, Consul, Vault, Nomad, and Serf. Even the next-mdx-remote package, which is used in this blog to make it work with mdx, traces back to HashiCorp.

Mitchell’s technical portfolio is both diverse and impressive — he even created a Hearthstone log analyzer (one of my favourite Blizzard's game), later sold to an esports team.

But what stands out most is his commitment to the ecosystem. He donated 300k usd to support Zig programming language — the very language that powers Ghostty. Supporting the tools you depend on isn't just good practice, it's admirable.

Zig and Ghostty performance

Ghostty is built using Zig, a programming language often seen as a modern successor to C and it's performance and with safety of Rust. Zig's standout features include built-in cross-compilation support, making it an ideal choice for creating a high-performance, cross-platform terminal emulator.

Performance benchmarks

Mitchell published benchmarks comparing Ghostty with other popular terminal emulators.

The results are impressive: Ghostty excels in both throughput and rendering performance.

TerminalVersionSpeed
Ghostty874c4e1373ms
Alacritty0.13.166ms
iTerm23.4.23470ms
KittySIMD Branch103ms
Kitty0.32.1392ms
Terminal.appmacOS 14.3124ms
WezTerm20240203-110809-5046fc22140ms
Numbers showing running cat on large unicode japanese file (5.4mb)

Except the fact, that it's written in Zig, which is a prime language to make it fast, there were done other performance optimizations (shortly described below). If you'd like to read more in detail, I highly recommend to check Mitchell's blog.

Key Optimizations

  • Precomputed Lookup Tables: Calculating the width of Unicode characters is computationally expensive. Ghostty uses a trie-like 3-stage lookup table to precompute character widths, avoiding runtime overhead.

  • Grapheme Clustering: Handling multi-codepoint graphemes (like emojis or Arabic script) is notoriously tricky for terminal emulators. Ghostty's optimized grapheme break detection mechanism is up to 8x faster than standard approaches.

    Ghostty is faster at reading plain text while doing grapheme break detection over terminals that read plain text while doing nothing.

It's native

Ghostty isn’t just cross-platform; it also integrates deeply with the native UI libraries and SDKs of each operating system. On Linux, it uses GTK and optionally integrates with Adwaita, ensuring consistency with GNOME and KDE environments.

On macOS, Ghostty feels right at home:

  • Triple Tap Lookup: Supports macOS’s “Look Up” feature with a three-finger tap on the trackpad.
  • Secure Keyboard Entry: A rare feature, supported only by iTerm2, Terminal.app, and now Ghostty.
  • Native Tabs: Powered by UIKit, they blend seamlessly with macOS’s UI.

These thoughtful integrations elevate Ghostty beyond being just another terminal emulator.

It has great features

Splitting

Ghostty supports splitting on panes out of the box, so you may consider to stop use tmux or another multiplexer.

Theming

In this matter Ghostty is very close to Iterm2, which has built-in theme picker in settings. All that you need to open theme list is to run

ghostty +list-themes

in your terminal and you will see a beautiful theme list. In fact, it's sourced from iterm2-color-scheme and updates weekly.

You can immediately see all the palette colors and how the code looks with the scheme.

Kitty image protocol

It was one of the features why I started to use Kitty over Alacritty. The ability to preview images in the terminal.

Fonts, ligatures

Ghostty supports nerd fonts out of the box, ligatures and native system fonts. Combining with ligatures support, ghostty delivers an elegant typing experience.

Feature Highlights

Pane Splitting

Ghostty comes with built-in pane splitting. For many users, this might remove the need for external tools like tmux, if you used the terminal before that does not support splitting and you do not need other multiplexer features, you might consider to stop using it.

Theming

The terminal includes a polished theme picker inspired by iTerm2. Run ghostty +list-themes to preview available themes in a beautiful, easy-to-navigate interface. Themes are sourced from iTerm2 Color Schemes and updates weekly.

ghostty themes

Kitty Image Protocol

If you've used Kitty, you're probably familiar with its image protocol. Ghostty supports this feature as well, allowing image previews directly in your terminal.

Font and Ligature Support

Ghostty supports Nerd Fonts, ligatures, and native system fonts, providing a refined and visually appealing typing experience.

Quick Terminal

Ghostty features a quick terminal, reminiscent of tools like Guake on Linux or the dropdown terminal in iTerm2. While I personally stopped using this feature after moving away from iTerm2, I can see its appeal for users who rely on it heavily. If you're transitioning you'll likely appreciate the familiarity and convenience it brings.

and other features :)

Final thoughts

Ghostty standing out as a unique terminal emulator that combines exceptional performance, cross-platform compatibility, native integrations, and a polished user experience.

If you're searching for a modern, high-performance terminal with an impressive feature set, Ghostty is definitely worth exploring.

Few other terminals manage to deliver such a well-rounded experience.