mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
Introduce the first public C render-state surface for libghostty-vt. Before this change, the render-state path was only available in Zig, so C embedders had no direct way to create and update that cache. Add an opaque GhosttyRenderState type with new, update, and free entry points, then wire those symbols through the C API bridge and library exports. Keep the surface intentionally minimal for now so ownership and update behavior are established before adding read accessors.
Example: ghostty-vt Render State
This contains a simple example of how to use the ghostty-vt render-state API
to create a render state, update it from terminal content, and clean it up.
This uses a build.zig and Zig to build the C program so that we
can reuse a lot of our build logic and depend directly on our source
tree, but Ghostty emits a standard C library that can be used with any
C tooling.
Usage
Run the program:
zig build run