fix: use Zig's numeric parsing in protocol and escape-sequence parsers
Rust's str::parse accepts and rejects different inputs than Zig's std.fmt.parseInt/parseFloat (underscores, base prefixes, signs). The config layer already used the Zig ports; now the protocol parsers do too (call site -> Zig reference -> status in final-Z12.md): - zig_fmt moves into the leaf crate ghostty-zigfmt (ghostty-vt cannot depend on ghostty-os); ghostty-os re-exports it unchanged. - ghostty-vt: kitty graphics keys, kitty text sizing, OSC 4/5/10-19 color indices, hex color components and intensities, OSC 9 sleep and progress, OSC 133 exit codes, OSC 3008 fields, kitty color palette. - ghostty-terminal: tmux layout, format variables and pane tabs. - ghostty-os: URI ports and %XX decoding; ghostty-bench CLI arguments. Expected values were cross-checked against the real Zig toolchain. Test Plan: - cargo test --workspace --no-fail-fast - just check-macos (both), just check-windows, just check-wasm
This commit is contained in:
1 parent
ecd67c8f3e
commit
16eb1fba61
22 files changed
+290
-186
No files matched your search
Generated
+7
@@ -1618,6 +1618,7 @@ dependencies = [
|
||||
"crossbeam-channel",
|
||||
"gettext-rs",
|
||||
"ghostty-vt",
|
||||
"ghostty-zigfmt",
|
||||
"libc",
|
||||
"log",
|
||||
"nix 0.31.3",
|
||||
@@ -1698,6 +1699,7 @@ dependencies = [
|
||||
"ghostty-os",
|
||||
"ghostty-unicode",
|
||||
"ghostty-vt",
|
||||
"ghostty-zigfmt",
|
||||
"log",
|
||||
"onig",
|
||||
"png",
|
||||
@@ -1740,6 +1742,7 @@ name = "ghostty-vt"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base64 0.23.1",
|
||||
"ghostty-zigfmt",
|
||||
"log",
|
||||
"memchr",
|
||||
"thiserror 2.0.21",
|
||||
@@ -1766,6 +1769,10 @@ dependencies = [
|
||||
"temp-env",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ghostty-zigfmt"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "gio"
|
||||
version = "0.22.10"
|
||||
|
||||
Reference in new issue
Block a user