libghostty
Loading...
Searching...
No Matches
Build Info

Detailed Description

Query compile-time build configuration of libghostty-vt.

These values reflect the options the library was built with and are constant for the lifetime of the process.

Basic Usage

Use ghostty_build_info() to query individual build options:

void query_build_info() {
bool simd = false;
bool kitty_graphics = false;
bool tmux_control_mode = false;
printf("SIMD: %s\n", simd ? "enabled" : "disabled");
printf("Kitty graphics: %s\n", kitty_graphics ? "enabled" : "disabled");
printf("Tmux control mode: %s\n", tmux_control_mode ? "enabled" : "disabled");
}

Enumerations

enum  GhosttyOptimizeMode
enum  GhosttyBuildInfo {
  GHOSTTY_BUILD_INFO_INVALID = 0 , GHOSTTY_BUILD_INFO_SIMD = 1 , GHOSTTY_BUILD_INFO_KITTY_GRAPHICS = 2 , GHOSTTY_BUILD_INFO_TMUX_CONTROL_MODE = 3 ,
  GHOSTTY_BUILD_INFO_OPTIMIZE = 4
}

Functions

GhosttyResult ghostty_build_info (GhosttyBuildInfo data, void *out)

Enumeration Type Documentation

◆ GhosttyBuildInfo

Build info data types that can be queried.

Each variant documents the expected output pointer type.

Enumerator
GHOSTTY_BUILD_INFO_INVALID 

Invalid data type. Never results in any data extraction.

GHOSTTY_BUILD_INFO_SIMD 

Whether SIMD-accelerated code paths are enabled.

Output type: bool *

GHOSTTY_BUILD_INFO_KITTY_GRAPHICS 

Whether Kitty graphics protocol support is available.

Output type: bool *

GHOSTTY_BUILD_INFO_TMUX_CONTROL_MODE 

Whether tmux control mode support is available.

Output type: bool *

GHOSTTY_BUILD_INFO_OPTIMIZE 

The optimization mode the library was built with.

Output type: GhosttyOptimizeMode *

Definition at line 49 of file build_info.h.

◆ GhosttyOptimizeMode

Build optimization mode.

Definition at line 37 of file build_info.h.

Function Documentation

◆ ghostty_build_info()

GhosttyResult ghostty_build_info ( GhosttyBuildInfo data,
void * out )

Query a compile-time build configuration value.

The caller must pass a pointer to the correct output type for the requested data (see GhosttyBuildInfo variants for types).

Parameters
dataThe build info field to query
outPointer to store the result (type depends on data parameter)
Returns
GHOSTTY_SUCCESS on success, GHOSTTY_INVALID_VALUE if the data type is invalid
Examples
c-vt-build-info/src/main.c.