feat: port GTK version fallbacks, helpgen, bench modes, CLI leftovers
- apprt-gtk: Ghostty's runtime+build-time version gating (at_least) with cargo features adw_1_3/adw_1_4/adw_1_5/gtk_4_16 (default on) and the fallbacks for older libraries: MessageDialog (adw < 1.5), clipboard dialog without SwitchRow, pre-Banner debug warning and child-exited widgets, the old about dialog, GTK 4.16 CSS error source bytes. The minimum stays GTK 4.14 / libadwaita 1.5 (Ghostty's floor). The root build links with -z lazy so version-gated symbols don't keep older libraries from loading. - ghostty-helpgen (port of helpgen.zig) generates CLI action help and keybinding action docs from doc comments at build time, replacing the checked-in help/*.txt; +help and +list-actions --docs stay byte-identical to Ghostty 1.3.1. - ghostty-bench: libc wcwidth mode and separate simd/table and uucode/table code paths like Zig. - ghostty-cli: Windows branches of edit-config, list-colors, list-keybinds and boo; ssh-cache DiskCache flock locking (no-op on Windows, as in Zig) with an exclusivity test. Test Plan: - cargo test --workspace - diff <(cargo run -q -- +list-actions --docs) \ <(ghostty +list-actions --docs)
This commit is contained in:
1 parent
020beb2d75
commit
4787565397
51 files changed
+2426
-1621
No files matched your search
@@ -148,23 +148,9 @@ impl Action {
|
||||
/// function, i.e. `help_strings.Action.<name>`), without trailing newline.
|
||||
#[must_use]
|
||||
pub fn help_text(self) -> &'static str {
|
||||
match self {
|
||||
Action::Version => include_str!("help/version.txt"),
|
||||
Action::Help => include_str!("help/help.txt"),
|
||||
Action::ListFonts => include_str!("help/list-fonts.txt"),
|
||||
Action::ListKeybinds => include_str!("help/list-keybinds.txt"),
|
||||
Action::ListThemes => include_str!("help/list-themes.txt"),
|
||||
Action::ListColors => include_str!("help/list-colors.txt"),
|
||||
Action::ListActions => include_str!("help/list-actions.txt"),
|
||||
Action::SshCache => include_str!("help/ssh-cache.txt"),
|
||||
Action::EditConfig => include_str!("help/edit-config.txt"),
|
||||
Action::ShowConfig => include_str!("help/show-config.txt"),
|
||||
Action::ValidateConfig => include_str!("help/validate-config.txt"),
|
||||
Action::ShowFace => include_str!("help/show-face.txt"),
|
||||
Action::CrashReport => include_str!("help/crash-report.txt"),
|
||||
Action::Boo => include_str!("help/boo.txt"),
|
||||
Action::NewWindow => include_str!("help/new-window.txt"),
|
||||
}
|
||||
// Generated by `build.rs` (via `ghostty-helpgen`) from the doc
|
||||
// comment of each action's `run` function.
|
||||
include!(concat!(env!("OUT_DIR"), "/action_help.rs"))
|
||||
}
|
||||
|
||||
/// Run the action. `args` is the full argument vector (including
|
||||
|
||||
Reference in new issue
Block a user