From 32bf37e5e42bf6097cfea0f445ae30fe997535a5 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 23 Sep 2025 15:26:06 -0700 Subject: [PATCH] setup basic doxygen for docs We may not stick with Doxygen, but it gives us something to start with. --- Doxyfile | 28 ++++++++++++++++++++++++++++ nix/devShell.nix | 2 ++ src/lib_vt.zig | 6 +++--- 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 Doxyfile diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 000000000..d6bf92a9a --- /dev/null +++ b/Doxyfile @@ -0,0 +1,28 @@ +# Doxyfile 1.13.2 + +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "libghostty" +INPUT = include/ghostty-vt.h +INPUT_ENCODING = UTF-8 +RECURSIVE = NO + +#--------------------------------------------------------------------------- +# HTML Output +#--------------------------------------------------------------------------- + +GENERATE_HTML = YES +HTML_OUTPUT = zig-out/share/ghostty/doc/libghostty + +#--------------------------------------------------------------------------- +# Man Output +#--------------------------------------------------------------------------- + +GENERATE_MAN = YES +MAN_OUTPUT = zig-out/share/man +MAN_EXTENSION = .3 + +#--------------------------------------------------------------------------- +# Other Output +#--------------------------------------------------------------------------- + +GENERATE_LATEX = NO diff --git a/nix/devShell.nix b/nix/devShell.nix index 783d6018d..0c97ec0da 100644 --- a/nix/devShell.nix +++ b/nix/devShell.nix @@ -3,6 +3,7 @@ lib, stdenv, bashInteractive, + doxygen, nushell, appstream, flatpak-builder, @@ -89,6 +90,7 @@ in packages = [ # For builds + doxygen jq llvmPackages_latest.llvm minisign diff --git a/src/lib_vt.zig b/src/lib_vt.zig index 444f08d3c..98242ce78 100644 --- a/src/lib_vt.zig +++ b/src/lib_vt.zig @@ -66,9 +66,9 @@ pub const TabClear = terminal.TabClear; pub const Attribute = terminal.Attribute; comptime { - if (terminal.is_c_lib) { - _ = terminal.c_api; - } + // If we're building the C library (vs. the Zig module) then + // we want to reference the C API so that it gets exported. + if (terminal.is_c_lib) _ = terminal.c_api; } test {