[package] name = "ghostty-macos" version.workspace = true edition.workspace = true license.workspace = true description = "Ghostty's macOS app (Sources/ of the Swift app) ported to Rust/AppKit; drives libghostty (ghostty-lib) in-process" # On non-Apple targets both the library and the binary compile to empty stubs so # the workspace stays green; the real code is `cfg(target_vendor = "apple")`. [lib] name = "ghostty_macos" [[bin]] name = "ghostty-macos-app" path = "src/main.rs" [dependencies] bitflags = "2" libghostty = { package = "ghostty-lib", path = "../ghostty-lib" } log = "0.4.34" [target.'cfg(target_vendor = "apple")'.dependencies] # The embedded C API, called in-process exactly like the Swift app calls # `ghostty.h` (renamed so it does not clash with the `ghostty` module tree). block2 = "0.6.2" dispatch2 = "0.3.1" libc = "0.2.190" objc2 = { version = "0.6.5", features = ["exception"] } objc2-app-kit = "0.3.2" objc2-core-foundation = "0.3.2" objc2-core-graphics = "0.3.2" objc2-foundation = "0.3.2" objc2-metal = "0.3.2" objc2-quartz-core = "0.3.2" objc2-user-notifications = "0.3.2" # The workspace forbids `unsafe`; objc2 needs it for class definitions, message # sends with raw pointers and the C API, so this crate denies it and allows it # (with SAFETY comments) in the few modules that need it. [lints.rust] unsafe_code = "deny" [lints.clippy] pedantic = { level = "warn", priority = -1 } todo = "warn" unwrap_used = "warn" cast_possible_truncation = "allow" cast_possible_wrap = "allow" cast_sign_loss = "allow" cast_precision_loss = "allow" cast_lossless = "allow" module_name_repetitions = "allow" too_many_lines = "allow" missing_errors_doc = "allow" missing_panics_doc = "allow" similar_names = "allow" struct_excessive_bools = "allow" fn_params_excessive_bools = "allow" match_same_arms = "allow" unreadable_literal = "allow" many_single_char_names = "allow" doc_markdown = "allow" must_use_candidate = "allow" return_self_not_must_use = "allow" used_underscore_binding = "allow" large_stack_arrays = "allow" inline_always = "allow" missing_safety_doc = "allow" # The AppKit code mirrors the Swift sources statement by statement (nested # `if let`s, `match` on bools, wildcard imports of the generated C enumerators). collapsible_if = "allow" collapsible_else_if = "allow" match_bool = "allow" wildcard_imports = "allow" unused_self = "allow" ref_as_ptr = "allow" ptr_cast_constness = "allow" redundant_closure_for_method_calls = "allow" manual_is_variant_and = "allow" semicolon_if_nothing_returned = "allow" [dev-dependencies] tempfile = "3"