Ports apprt/embedded.zig, main_c.zig and config/CApi.zig + c_get.zig as crates/ghostty-lib (cdylib/staticlib/rlib `libghostty`), exporting every function of the unchanged include/ghostty.h - the ABI Ghostty's Swift macOS/iOS app links against. The embedded runtime implements the runtime traits over the host's C callbacks, so the real core drives it. - ghostty-core selects the renderer per target: Metal on Apple (surface NSView/UIView via RtSurface::platform_view), OpenGL elsewhere. - ghostty_config_get follows Zig's c_get rules via a CValue type (143 supported keys, checked against the Zig field types). - The inspector C API is complete; its Metal backend replaces ImGui's Metal renderer and has not run. Verification: generated C ABI probe (sizeof/alignof/offsetof of every struct/union, 755 enum values, every function linked, nm exports, headers byte-identical to upstream); a C host on Linux covering init, CLI actions, config, app, keys, focus and color scheme; an opt-in test-platform feature creating real surfaces on Linux with headless EGL and a pty (13 tests). Apple targets are clippy-clean but not run; the Swift app has not been built against it. Test Plan: - cargo test -p ghostty-lib (and --features test-platform) - cargo clippy --target aarch64-apple-darwin -p ghostty-lib (cross env in docs/rewrite/notes/macos-M1.md)
34 lines
845 B
TOML
34 lines
845 B
TOML
[package]
|
|
name = "ghostty-core"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[dependencies]
|
|
base64 = "0.23.1"
|
|
crossbeam-channel = "0.5.17"
|
|
ghostty-apprt.workspace = true
|
|
ghostty-config.workspace = true
|
|
ghostty-crash.workspace = true
|
|
ghostty-datastruct.workspace = true
|
|
ghostty-font.workspace = true
|
|
ghostty-inspector.workspace = true
|
|
ghostty-input.workspace = true
|
|
ghostty-os.workspace = true
|
|
ghostty-renderer.workspace = true
|
|
ghostty-terminal.workspace = true
|
|
ghostty-termio.workspace = true
|
|
ghostty-unicode.workspace = true
|
|
ghostty-vt.workspace = true
|
|
log = { version = "0.4", features = ["std"] }
|
|
onig = "6.5.3"
|
|
png = "0.18.1"
|
|
thiserror = "2"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[target.'cfg(target_vendor = "apple")'.dependencies]
|
|
oslog = { version = "0.2.0", default-features = false }
|
|
objc2-core-foundation = "0.3.2"
|