Meet this terminal emulator written in Zig

🚀 Multiplatform, fast and feature-rich.


Meet this terminal emulator written in Zig


Ghostty is a fast and feature-rich multiplatform terminal emulator developed in Zig. Its distinguishing feature is that it combines performance, a native interface and compliance with modern standards, without compromising any of these aspects.

Main Features

  • Performance: Uses GPU rendering (OpenGL on GNU/Linux, Metal on macOS), maintaining 60fps even under intense load. In benchmarks, it outperforms terminals such as iTerm and Terminal.app in I/O speed.

  • Native Interface: On macOS, it is a complete SwiftUI application with support for menus, preferences, and system integration. On Linux, it uses GTK4 and libadwaita, offering a visual experience consistent with the environment.

  • Standards Compliance: It extensively implements xterm control sequences, in addition to supporting modern protocols such as Kitty graphics and keyboard. It is compatible with existing shells and tools.

  • Advanced Features: Support for multiple windows, tabs, screen splitting, typographic ligatures, and inline graphics rendering.

  • Embeddable Library: Provides libghostty, a C library compatible for integration into other projects. The macOS application itself is a consumer of this library.

Current Status

  • Available for macOS and Linux.
  • Version 1.0 released after two years of private testing with about 2,000 users.
  • Open source code under MIT license.
  • Over 30,000 stars on GitHub.
  • Windows version still under development.


Installation

On Ubuntu I installed using the AppImage: Ghostty-1.1.4-main+38445dc-x86_64.AppImage

wget https://github.com/pkgforge-dev/ghostty-appimage/releases/download/tip/Ghostty-1.1.4-main+38445dc-x86_64.AppImage
chmod +x Ghostty-1.1.4-main+38445dc-x86_64.AppImage
./Ghostty-1.1.4-main+38445dc-x86_64.AppImage

I did this because I tried via snap, but It’s bugged!

See below installation for other operating systems:

brew install --cask ghostty # Brew/macOS
sudo snap install ghostty --classic # Snap/Ubuntu[BUGGED]
sudo pacman -S ghostty # Pacman/Arch
emerge -av ghostty # Gentoo

# Fedora
dnf copr enable pgdev/ghostty
dnf install ghostty

More here: https://ghostty.org/docs/install/binary

Building from Scratch

Install Zig via this post

Use the latest stable version (not the development branch) that according to this post until current date is version: 0.14.0.

To compile Ghostty:

Clone the repository:

git clone https://github.com/ghostty-org/ghostty
cd ghostty

Compile:

zig build -Doptimize=ReleaseSafe

After compiling Ghostty, install it with:

zig build install

By default, it installs in ~/.local/bin. You can change the location with:

zig build install --prefix /desired/path

If you want, you can create an icon for the launch:

Here is a simple example of .desktop for Ghostty:

[Desktop Entry]
Name=Ghostty
Exec=/home/your-username/.local/bin/ghostty
Icon=utilities-terminal
Type=Application
Categories=Utility;TerminalEmulator;

Save it as ghostty.desktop in ~/.local/share/applications/ and run it:

update-desktop-database ~/.local/share/applications

For more information, visit the official repository


zig terminal


Share


YouTube channel

Subscribe


Marcos Oliveira

Marcos Oliveira

Software developer
https://github.com/terroo

Related articles