feat(apprt): port the core/runtime contract types

Ports ZIG/src/apprt/{action,structs,surface,ipc,runtime}.zig into
ghostty-apprt: the Action enum performed by the core on the app runtime
(all 65 variants with docs), Target<S> generic over the runtime's
surface handle, clipboard/size/scale/selection structs, the core->surface
Message enum with a Mailbox over an AppMailbox trait, and IPC action
types for +new-window.

Owned Strings and Arc<Config> replace Zig's borrowed slices/pointers.
Scrollbar and RendererHealth are local stand-ins until core integration.
The embedded C API and browser runtime are out of scope.

Test Plan:
- cargo test -p ghostty-apprt (16 tests)
This commit is contained in:
ddidderr committed 2026-10-11 22:25:05 +02:00
1 parent fe37bde1fa
commit 5a5fa7893b
9 files changed
+1529 -1

No files matched your search

Generated
+25
View File
@@ -321,6 +321,20 @@ name = "bytemuck"
version = "1.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797"
dependencies = [
"bytemuck_derive",
]
[[package]]
name = "bytemuck_derive"
version = "1.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.119",
]
[[package]]
name = "castaway"
@@ -876,6 +890,17 @@ dependencies = [
"temp-dir",
]
[[package]]
name = "ghostty-apprt"
version = "0.1.0"
dependencies = [
"ghostty-config",
"ghostty-datastruct",
"ghostty-input",
"ghostty-vt",
"thiserror 2.0.21",
]
[[package]]
name = "ghostty-apprt-gtk"
version = "0.1.0"