mirror-ghostty/example
Mitchell Hashimoto 08bbc5b752
build: add Meson wrapper for libghostty-vt
Add Meson build system integration mirroring the existing CMake
wrapper. The top-level meson.build delegates to zig build lib-vt
using --prefix-lib-dir and --prefix-include-dir to place outputs
directly in the Meson build directory, avoiding stamp files and
source tree pollution. A sentinel .h output ensures Meson orders
the zig build before any downstream compiles.

Downstream projects can consume the library either as a Meson
subproject via a .wrap file or through pkg-config after install.
The dist/meson/README.md documents both approaches.

Includes a c-vt-meson example, CI job in test.yml for auto-discovered
Meson examples, meson and ninja in the nix devShell, and gitignore
updates for Meson build artifacts.
2026-03-20 12:12:36 -07:00
..
c-vt update a bunch of required Zig versions to 0.15 2025-10-03 07:10:44 -07:00
c-vt-cmake build: add CMake support for libghostty-vt 2026-03-20 10:42:42 -07:00
c-vt-encode-focus docs: extract focus encoding example into standalone project 2026-03-17 16:48:48 -07:00
c-vt-encode-key example: rename some examples 2026-03-17 17:39:26 -07:00
c-vt-encode-mouse example: rename some examples 2026-03-17 17:39:26 -07:00
c-vt-formatter example: add c-vt-formatter example 2026-03-14 15:12:10 -07:00
c-vt-grid-traverse example: add grid reference traversal example 2026-03-19 19:55:02 -07:00
c-vt-meson build: add Meson wrapper for libghostty-vt 2026-03-20 12:12:36 -07:00
c-vt-modes docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
c-vt-paste docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
c-vt-render vt: fix render state cell style and graphemes_buf APIs 2026-03-20 09:24:31 -07:00
c-vt-sgr docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
c-vt-size-report docs: extract inline code examples into standalone projects 2026-03-17 17:03:58 -07:00
wasm-key-encode lib-vt: Wasm SGR helpers and example (#9362) 2025-10-26 13:19:55 -07:00
wasm-sgr lib-vt: Wasm SGR helpers and example (#9362) 2025-10-26 13:19:55 -07:00
zig-formatter terminal: make stream processing infallible 2026-03-13 13:56:14 -07:00
zig-vt update a bunch of required Zig versions to 0.15 2025-10-03 07:10:44 -07:00
zig-vt-stream terminal: make stream processing infallible 2026-03-13 13:56:14 -07:00
.gitignore build: add Meson wrapper for libghostty-vt 2026-03-20 12:12:36 -07:00
AGENTS.md Add example AGENTS file 2026-03-17 17:13:08 -07:00
README.md example: add README 2026-03-17 17:37:20 -07:00

README.md

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