Closes the remaining core/lib/termio/GTK rows (final-Z2.md): - ghostty-core compiles for Windows (Unix-only exec fields and file modes gated); checked with cargo check --target x86_64-pc-windows-gnu. - Embedded init: ensure_locale, SIGPIPE ignored in ghostty_init for C/Swift hosts, Apple crash tags; the argv passed to ghostty_init feeds ghostty_config_load_cli_args; ghostty_config_load_file accepts non-UTF-8 paths. - OSC 7 pwd, embedded surface cwd/command/env/initial input, ghostty_surface_text and GTK file drops keep raw bytes. - XTVERSION, TERM_PROGRAM_VERSION, the About dialog and crash metadata use ghostty_build_info instead of hardcoded versions. Test Plan: - cargo test --workspace (3327 passed) - cargo clippy --workspace --all-targets -- -D warnings
1.9 KiB
1.9 KiB
Z2 final notes (core / lib / termio / apprt-gtk)
- Windows:
cargo check --target x86_64-pc-windows-gnu -p ghostty-core --testspasses. Surface init gatesrt_pre_exec_info,rt_post_fork_info,create_scopeandrestore_rlimitoncfg(unix). Screen-file writing only sets mode 0600 on unix. The test that read the file mode is unix-gated. - Embedded init:
global::initcallsensure_locale.InitOptions.crashcarries crash metadata, withdefault_crash_options()(shared version; Metal/CoreText/nonetags on Apple).ghostty_initignores SIGPIPE and passes crash options for the lib build. It also stores the raw argv withghostty_os::args::set_argv, soghostty_config_load_cli_argsuses it (I addedset_argvand a vec-returningiterator()in ghostty-os/args.rs).ghostty_config_load_filekeeps non-UTF-8 path bytes (file_load::opendecodes them). - Bytes:
Pwd.pwdandSurface::pwd()carry OSC 7 bytes with the reversibleosbytesescape.pwd_bytes()returns the raw bytes. Sinks decode: CAction::Pwd, inherited working dir, termio cwd/args/env/PWD/Rawinput. Embedded surface working-directory/command/env/initial_input andghostty_surface_text(text_callback_bytes) pass raw bytes. GTK file drop usespaste_bytesand a newCoreSurface::complete_paste_bytes. - Version: XTVERSION,
TERM_PROGRAM_VERSION, both GTK About branches and crash metadata useghostty_build_info::VERSION_STRING. - Tests added: e2e OSC 7 non-UTF-8,
command.rsnon-UTF-8 cwd/args,embeddedsurface-options bytes,tests/init_argv.rs(argv, SIGPIPE, non-UTF-8 load_file), crash defaults. - Gate: workspace build, tests and clippy (
--no-deps -D warnings) for my crates pass, andcargo +nightly fmtis applied. Not done: macOS cross clippy (the wrapper setup was declined at the tool prompt). No GTK drop UI test (needs a display). The paste confirmation dialog is text-based, so it carries non-UTF-8 bytes via the escape.