Skip to content

pkg config support#29

Merged
Uzaaft merged 9 commits into
masterfrom
pkg-config-support
Apr 28, 2026
Merged

pkg config support#29
Uzaaft merged 9 commits into
masterfrom
pkg-config-support

Conversation

@Uzaaft

@Uzaaft Uzaaft commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Builds upon #27

@pluiedev The last commit in this PR contains the compat changes we talked about yesterday.

Please review por favore. 🙏🏾

cc @domenkozar

(Yes, I created a branch by accident instead of pushing to your PR @domenkozar. I blame the gh cli)

domenkozar and others added 9 commits April 13, 2026 17:18
Add a `pkg-config` cargo feature (off by default) that tries pkg-config
first to locate libghostty-vt. If found (e.g. on NixOS where the
pkg-config wrapper adds rpath automatically), skip the zig build
entirely. Otherwise fall back to building from source.

Bump pinned ghostty commit to include ghostty-org/ghostty#12210 which
generates libghostty-vt.pc and libghostty-vt-static.pc during the zig
build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update the checked-in export manifest to match the regenerated bindings
from the new Ghostty pin.
Turn off doctests for the generated sys crate so rustdoc stops treating
imported C prose from bindgen as runnable Rust examples.

The handwritten crate-level docs stay covered elsewhere, while the
generated bindings no longer fail cargo test for reasons unrelated to
the FFI code itself.
Use Debug formatting for ImageFormat in the Kitty graphics example. The
type does not implement Display
Keep an explicit GHOSTTY_SOURCE_DIR override authoritative even when
the pkg-config feature is enabled.

The build script now checks for GHOSTTY_SOURCE_DIR before probing
pkg-config, and the README files now describe the resulting behavior.
The pkg-config path remains opt-in, but it is only used when no source
override is set.

@pluiedev pluiedev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this approach makes more sense to me at the moment. We can always add the rpath stuff if it turns out to be necessary.

@Uzaaft Uzaaft merged commit 1a0aeb5 into master Apr 28, 2026
3 checks passed
@Uzaaft Uzaaft deleted the pkg-config-support branch May 1, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants