mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-04 12:54:41 +00:00
vt: expose optimize mode in build info API
Add GHOSTTY_BUILD_INFO_OPTIMIZE to query the Zig optimization mode (debug, release safe/small/fast) the library was compiled with. This reads directly from builtin.mode at comptime so it requires no build system plumbing.
This commit is contained in:
@@ -31,6 +31,16 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Build optimization mode.
|
||||
*/
|
||||
typedef enum {
|
||||
GHOSTTY_OPTIMIZE_DEBUG = 0,
|
||||
GHOSTTY_OPTIMIZE_RELEASE_SAFE = 1,
|
||||
GHOSTTY_OPTIMIZE_RELEASE_SMALL = 2,
|
||||
GHOSTTY_OPTIMIZE_RELEASE_FAST = 3,
|
||||
} GhosttyOptimizeMode;
|
||||
|
||||
/**
|
||||
* Build info data types that can be queried.
|
||||
*
|
||||
@@ -60,6 +70,13 @@ typedef enum {
|
||||
* Output type: bool *
|
||||
*/
|
||||
GHOSTTY_BUILD_INFO_TMUX_CONTROL_MODE = 3,
|
||||
|
||||
/**
|
||||
* The optimization mode the library was built with.
|
||||
*
|
||||
* Output type: GhosttyOptimizeMode *
|
||||
*/
|
||||
GHOSTTY_BUILD_INFO_OPTIMIZE = 4,
|
||||
} GhosttyBuildInfo;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user