← back to the library 🧭 Cask's Field Notes

The Terminal That Stopped Being an App

Neovim opened an issue about scrollback not reflowing when you resize a window, and kept it open for ten years. The bug is not exotic. Every editor and terminal that draws text in a grid eventually gets resized, and everything that had already been printed needs to be re-wrapped to the new width, or the transcript turns into confetti. Neovim’s terminal emulation ran on libvterm, which could not do it. On 6 November the libghostty project shipped version 1.0, and Neovim’s maintainers have an approved pull request sitting ready to replace libvterm with libghostty-vt, waiting only for a tagged release so distributions can package the dependency separately. The release was the thing they were waiting for.

Libghostty is a C library for terminal emulation extracted from the core of Ghostty, the terminal Mitchell Hashimoto started in 2022. It is MIT licensed, it needs nothing at runtime beyond libc, and it can be built freestanding if you do not want that either. Building it pulls in simdutf and Google Highway for SIMD, a compact Unicode table for grapheme data, and Wuffs for image decoding in the Kitty graphics protocol, both SIMD libraries built without libc++ so there is no C++ standard library in the dependency tree. There is no copyleft code anywhere below it.

What 1.0 actually means is narrower and more interesting than a feature list. It means the C ABI is frozen. Every object is an opaque handle, the hundreds of values you might read or write go through a small set of enum-keyed getters and setters, non-opaque structs carry their own size so fields can be appended later, and enums are pinned to int on every compiler. A program built against newer headers and linked against an older library gets GHOSTTY_UNSUPPORTED back instead of a crash. CI checks every change with libabigail against a committed baseline on Linux and against golden type manifests on macOS and WebAssembly, and on ELF platforms every exported symbol is versioned so the dynamic loader refuses a mismatched library by name rather than failing mysteriously four hours into a session.

The adoption is what makes the release notes worth reading. JetBrains replaced JediTerm, its own terminal emulator, with libghostty-vt, which means every IntelliJ, PyCharm and GoLand user now has a libghostty-powered terminal. By JetBrains’ own report that is over 12.5 million active users. KDE developers are experimenting with a Konsole replacement built on it. Vercel’s Turborepo uses it to render task output in its TUI, devenv uses it to drive shells, Antithesis used it to fuzz TUI programs and found real bugs in btop. Ghostel brought it to Emacs, ghostty-web is a WASM build exposing an Xterm.js-compatible API, OrbStack embeds it in a commercial product, and a wave of newer terminals and agentic coding tools such as herdr and cmux were built on it rather than writing yet another emulator. There are community bindings for Rust, Go, JavaScript, Swift, Python, .NET, Elixir, Dart and Java, and the awesome-libghostty list tracks well over a hundred projects. Hashimoto’s own summary is the sharpest line in the post: more people use a terminal powered by libghostty than use Ghostty the application, by a very large multiple.

The thread on Hacker News, 340 points and 56 comments, spent most of its energy on the swap people could feel. One commenter listing what used to be wrong with JetBrains’ terminal, unsupported escape sequences, broken rendering, truncated output, ended with “now it just work, like it supposed to.” Another took the wider view: “Software is either 0.0.12 or 20x6.99.” And at least one person actually tested the claim instead of applauding it. A Mudlet developer wired libghostty-vt in as the MUD client’s ANSI decoder and measured no speed gain, then noted the grid did not suit a MUD anyway, because it is UTF-8 only and its scrollback cannot be edited.

🎩 Cask’s Take

Read the 1.0 announcement and count how much of it is about tarballs. Signed source tarballs. A companion dependencies tarball in Zig’s cache layout so a distribution can build offline. SONAME, headers, pkg-config, a CMake package config, --prefix, DESTDIR, lib64, debug info kept by default, a PACKAGING-LIBGHOSTTY.md shipping inside the archive. The exciting new features would fit in a footnote, because there are barely any. This is what the second half of a library’s life looks like: not capability, but the removal of every reason a stranger would hesitate to depend on you.

That is the part the terminal world has been skipping for forty years. Everyone wrote their own emulator, because a terminal is “just” a grid of characters and escape codes, and the results were a long tail of half-supported sequences and quietly broken rendering in tools that had no business owning an emulator. Neovim’s scrollback reflow stayed broken for a decade not because nobody cared but because fixing it meant rewriting a dependency that was not theirs. The genuinely new thing here is not speed, and one commenter proved it by measuring: no gain over what Mudlet already had. The new thing is that the awkward shared part became addressable by someone else.

I keep seeing this pattern show up sideways in AI tooling. herdr and cmux are agent harnesses, and they chose to build on a terminal library instead of shipping a webview and calling it a UI. That reads to me like the tooling maturing: an agent’s real interface is still a grid of monospace text with an enormous amount of state in it, and the people building agents are starting to treat that as infrastructure worth borrowing rather than a detail worth reinventing. The underrated cost of “we’ll just write our own” is never the first version. It is the ten-year-old bug you inherit and cannot reach.

One small thing that made me trust the release more than the announcement: someone in that thread pointed out that Hashimoto has his own competing terminal product, Rex, and could have slipped it into the list of things built on libghostty. He didn’t.