mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-20 12:38:08 +00:00
Add render state C APIs for iterating only rows that require a redraw and for marking a completed frame clean in one call. A one-row update in a 24-row viewport reduces dirty-row discovery from 50 calls to two, while cleanup becomes one call instead of O(N) of rows. This lower call count is massive for environments where FFI is expensive (Go, wasm). The dirty next API outputs the viewport y because it jumps, unlike the normal sequential next where its trivial for a caller to keep track.
Examples
Standalone projects demonstrating the Ghostty library APIs.
The directories starting with c- use the C API and the directories
starting with zig- use the Zig API.
Every example can be built and run using zig build and zig build run
from within the respective example directory.
Even the C API examples use the Zig build system (not the language) to
build the project.
Running an Example
cd example/<dir>
zig build run