Commit Graph

9268 Commits

Author SHA1 Message Date
Mitchell Hashimoto
4ceeba4851 config: use Config to check key binding instead of App (#12415)
Previously `ghostty_app_key_is_binding` (unlike Surface) is just using
`config.keybind` to check whether a KeyEvent is in the set or not.

After this, I can add unit tests for keybinding more easily with dummy
configs.

I didn't find any usages of this in GTK, so it shouldn't affect
anything. ci will see if this is the case:)
2026-04-24 14:51:22 -07:00
0xDVC
44a2d8740a build: gate lib-vt xcframework on emit-xcframework with xcodebuild detection 2026-04-24 13:21:43 -07:00
Mitchell Hashimoto
6b69ea0517 libghostty: enable cross-compiling macOS from Linux/Windows
This allows libghostty-vt to be cross-compiled for macOS from non-macOS
platforms. I've updated pkg/apple-sdk to fallback to Zig's embedded
macOS headers if the macOS SDK is not found.

Additionally, CombineArchivesStep has been updated to use Linux
tooling on Linux.
2026-04-24 13:04:38 -07:00
Lukas
7c91cef28d config: use Config to check key binding instead of App
Previously `ghostty_app_key_is_binding` (unlike Surface) is just using `config.keybind` to check whether a KeyEvent is in the set or not.

After this, I can add unit tests for keybinding more easily, with dummy configs.
2026-04-24 18:26:56 +02:00
Mitchell Hashimoto
bf3047b9b2 benchmark: isolate parser hot loop from code-layout shifts
Extract the tight per-byte parsing loop from TerminalParser.step into
a separate noinline function (parseAll). This eliminates a ~20%
benchmark regression that appeared after the highway vendor changes
despite zero changes to the parser source code.

The root cause: the parser benchmark processes 50 MB of input through
a byte-at-a-time DFA loop that is highly sensitive to instruction
cache-line placement on Apple Silicon. The M-series cores fetch
aligned 16-byte blocks; when the loop head lands near the end of a
64-byte cache line (offset 60), only one instruction fits in the
first fetch versus four when aligned to offset 48. This causes ~29%
more cycles for identical instruction counts.

Previously the loop was inlined into the large step() function, so
any code change anywhere in the binary (like the highway vendor
restructuring) could shift the loop across a cache-line boundary.
By making parseAll noinline, the loop gets its own function placement
that is stable regardless of surrounding code changes.
2026-04-23 21:36:39 -07:00
Mitchell Hashimoto
f3f9af6129 pkg/highway: vendor and modify to remain all libc usage 2026-04-23 20:28:43 -07:00
Mitchell Hashimoto
2f1a30ddb0 font: add Windows font discovery backend (#12386)
Adds a FreeType-based `Discover` implementation for Windows. It walks
the system font directory (`%SYSTEMROOT%\Fonts`) and the per-user
directory (`%LOCALAPPDATA%\Microsoft\Windows\Fonts`), matches
descriptors by FreeType `family_name` (falling back to the SFNT name
table), and, when a codepoint is in the descriptor, filters on CMap
coverage.

Wired up as a new `.freetype_windows` backend which `Backend.default()`
now returns on Windows. Existing freetype-only paths are untouched and
no other platform is affected; cross-platform switches were extended to
handle the new enum value the same way they handle `.freetype`.

With this in place, the standard code paths (`+list-fonts`,
`SharedGridSet` font-family lookup, `CodepointResolver` fallback) work
on Windows without any `os.tag == .windows` branches in the caller.

Verified by the `build-libghostty-windows-gnu` CI job. No runtime binary
ships yet on Windows (no apprt), but this is a drop-in for the discovery
API that the Win32 apprt (and the revisited `+list-fonts` PR #12384)
will use. Once this lands, #12384 can be closed and `+list-fonts` will
work on Windows through the ordinary discovery code path, which
addresses the review feedback that `+list-fonts` should only show fonts
the internal discovery can find.

---

AI usage disclosure: developed with Claude Code (Claude Opus 4.7).
Claude drafted the implementation based on my design direction -- I
picked the "add a Discover backend" shape over the ad-hoc approach in
the earlier `+list-fonts` PR. I reviewed each diff and validated it with
a Windows GNU-ABI smoke build before pushing.

Part of the Win32 apprt upstreaming series (see discussion #2563 /
mattn/ghostty#1).
2026-04-23 10:45:50 -07:00
Mitchell Hashimoto
c1b685bc62 Add code for validating OpenType GLYF table entries (#12375)
This code was motivated by the need for the glyph protocol handler
(#12352) to be able to validate the provided `glyf` payload, without
having to link freetype or anything (because libghostty-vt needs to be
static). As such it's written specifically to meet those needs, but in
such a way that it can be expanded if we find a need for more in-depth
inspection of `glyf`s in the future.
2026-04-23 09:52:39 -07:00
Qwerasd
464c50457b font/opentype: accept header-only simple glyf entry 2026-04-23 12:41:14 -04:00
Yasuhiro Matsumoto
0343a4d98f address review: update DeferredFace test discover callsites
Two more holdouts in DeferredFace.zig test helpers calling
Fontconfig.init / CoreText.init with no args; Nix test CI surfaced
them for the fontconfig path.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-24 01:40:01 +09:00
Mitchell Hashimoto
bc90a51282 build: fat static archive and ubsan fix for external linkers (#12217)
## Summary

> [!IMPORTANT]
> Stacked on #12214. Review that first. (i am targeting `main` so here
you will see the full changeset, including 12214

Two changes that make the static libghostty archive consumable by
external linkers (MSVC link.exe, .NET NativeAOT, Rust, Go, etc.):

**Fat static archive on all platforms**

The static archive previously only bundled vendored deps on macOS (via
libtool). On Windows and Linux the archive contained only the
Zig-compiled code, requiring consumers to find and link freetype,
harfbuzz, glslang, spirv-cross, simdutf, oniguruma, etc. separately.

Now all platforms produce a single fat archive:
- macOS: libtool (unchanged)
- Windows: zig ar qcL --format=coff (MSVC's lib.exe can't read
Zig-produced GNU-format archives, so we use the bundled LLVM archiver)
- Linux: ar -M with MRI scripts (same approach as libghostty-vt)

**MSVC ubsan suppression for C deps**

Zig's ubsan runtime can't be bundled on Windows (LNK4229), leaving
__ubsan_handle_* symbols unresolved. freetype, glslang, spirv-cross, and
highway already suppress ubsan. This adds MSVC-conditional suppression
to seven more: harfbuzz, libpng, dcimgui, wuffs, oniguruma, zlib, and
stb.

Gated on abi == .msvc so ubsan coverage is preserved on Linux/macOS.

## Test plan

- [x] zig build produces a fat ghostty-static.lib (~230MB) with ~200
object files
- [x] MSVC's lib /LIST can read the archive
- [x] .NET NativeAOT consumer resolves all symbols (0 unresolved)
- [x] Linux/macOS builds unaffected (ubsan remains enabled)
2026-04-23 09:33:05 -07:00
Yasuhiro Matsumoto
fe725b5da1 address review: update shaper test discover callsites
CI on Windows (MSVC) surfaced three remaining callers of the old
zero-arg `Discover.init()` in shaper test helpers that the earlier
commit missed. Pass `lib` to match the new signature.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-24 01:27:58 +09:00
Mitchell Hashimoto
239b97eccc termio: run Windows shell commands without a cmd.exe wrapper (#12389)
On Windows the configured shell was always executed as `cmd.exe /C
<shell>`. That inserts a cmd.exe even for simple values like `command =
wsl ~` or `command = pwsh -NoLogo`, producing two processes where one
would do.

Two concrete side effects:

An extra cmd.exe appears in every Windows terminal's process tree
(visible in Task Manager / process listings), two processes per surface
where only one is the user's shell.

cmd.exe state set by AutoRun (`HKCU\Software\Microsoft\Command
Processor\AutoRun`, used commonly for DOSKEY aliases or `cd` in
`init.cmd`) lives in the wrapping cmd process, not in the user's shell.
Since AutoRun state like DOSKEY aliases is per-process, the user's
aliases don't reach the shell they actually interact with.

Run the shell value directly instead. If it contains whitespace, split
on whitespace into argv. A bare `cmd.exe` is resolved via `%COMSPEC%`
(the documented path to the current command processor). Other bare
values are left to PATH resolution in `Command.startWindows` (#12387).

The simple whitespace split does not honor Windows CLI quoting rules;
users who need quoted arguments should use the direct command form,
which takes an argv array as-is. For the common case (`wsl ~`, `pwsh
-NoLogo`, `cmd.exe /k init.cmd`, etc.) this covers the shapes users
actually write today.

Also skips the termios focus timer on Windows in `focusGained`, since
Windows has no termios -- the callback was arming a timer whose tick did
nothing and just added noise.

---

AI usage disclosure: developed with Claude Code (Claude Opus 4.7).
Claude drafted the implementation based on my design direction -- I
picked which pieces belong in this PR (drop the cmd wrapper, use
`%COMSPEC%`, skip the termios focus timer) and which belong in sibling
PRs. I reviewed each diff and validated it with a Windows GNU-ABI smoke
build before pushing.

Part of the Win32 apprt upstreaming series (see discussion #2563 /
mattn/ghostty#1).
2026-04-23 09:05:47 -07:00
Jon Parise
04accc001d os: trim trailing path separators from tmpdir (#12397)
Because we generally read this value from an environment variable, we
the resulting value can include a trailing slash (as on macOS). This
results in less-friendly path operations for callers who are building
paths based on this value.

`std.fs.path.join()` handles trailing slashes just fine, but it's an
allocating API. For callers who just want to format a path, they have to
assume they need to include their own path separator.

We can make this friendlier by always trimming trailing path separators
from the environment variable values before returning the slice.

This behavior matches "higher-level" languages' standard libraries (I
checked Python, Node, Ruby, and Perl). Other "systems" languages (Go,
Rust) just return the system value as-is, like we were doing before.
2026-04-23 12:03:36 -04:00
Jon Parise
1ae27f95b4 os: trim trailing path separators from tmpdir
Because we generally read this value from an environment variable, we
the resulting value can include a trailing slash (as on macOS). This
results in less-friendly path operations for callers who are building
paths based on this value.

`std.fs.path.join()` handles trailing slashes just fine, but it's an
allocating API. For callers who just want to format a path, they have to
assume they need to include their own path separator.

We can make this friendlier by always trimming trailing path separators
from the environment variable values before returning the slice.

This behavior matches "higher-level" languages' standard libraries (I
checked Python, Node, Ruby, and Perl). Other "systems" languages (Go,
Rust) just return the system value as-is, like we were doing before.
2026-04-23 11:31:37 -04:00
Yasuhiro Matsumoto
8c5b8ac3c0 address review: add unit tests for Windows execCommand paths
Per review feedback, cover the four Windows branches added in the
parent commit:

- bare `cmd.exe` resolves via `%COMSPEC%` (with documented fallback)
- bare non-cmd shell (`pwsh.exe`) is passed through unchanged
- shell value with arguments (`wsl ~`) is split on whitespace
- direct command is passed through without modification

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-23 23:08:58 +09:00
Yasuhiro Matsumoto
5aef2541b0 address review: Discover.init takes a Library across all backends
Per review feedback, drop the `if (Discover == Windows)` comptime
branches in SharedGridSet and list_fonts by making every backend's
`init` take a Library and ignore it when unused. Call sites just do
`Discover.init(self.font_lib)` now.

Also adds a discovery test for the Windows backend that looks up
Arial and checks the returned face has the 'A' codepoint.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-23 23:06:21 +09:00
Yasuhiro Matsumoto
c32e88c6a7 Command: let CreateProcessW resolve the program via PATH
Pass null for lpApplicationName and put the program as the first
token of lpCommandLine. Per the Windows docs, this makes
CreateProcessW perform the standard program search (parent-app dir,
CWD, system dirs, PATH) and append ".exe" when the name has no
extension.

So a bare command name like `wsl` or `pwsh` from the Ghostty config
now resolves without any PATH/PATHEXT handling on our side. The
child also sees its argv[0] exactly as written rather than replaced
with the resolved absolute path.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-23 14:40:13 +09:00
Yasuhiro Matsumoto
fe2a909782 font/discovery: use %SYSTEMROOT%\Fonts instead of a hardcoded path
Resolve the system font directory from SYSTEMROOT rather than assuming
it lives on C:. If SYSTEMROOT is somehow unset we skip the system
directory instead of falling back to a literal drive letter.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-23 14:32:49 +09:00
Yasuhiro Matsumoto
61fce4d0a4 font: add Windows font discovery backend
Adds a FreeType-based Discover implementation for Windows that walks
the system (C:\Windows\Fonts) and per-user
(%LOCALAPPDATA%\Microsoft\Windows\Fonts) font directories, matching
descriptors via family_name / SFNT name table and optionally codepoint
presence.

Wired up as a new .freetype_windows backend which Backend.default() now
returns on Windows. Existing freetype-only paths are untouched.

With this in place, standard code paths -- +list-fonts, SharedGridSet
font-family lookup, CodepointResolver fallback -- work on Windows
without any os.tag == .windows branches in the caller.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-23 14:32:47 +09:00
Yasuhiro Matsumoto
ef7ecbd3e5 termio: run Windows shell commands without a cmd.exe wrapper
On Windows the shell value was always executed as `cmd.exe /C <shell>`.
For even a simple `command = wsl ~` this spawned two processes (the
cmd wrapper and the user's actual shell) and had visible side effects:
an extra cmd.exe in the process tree, and cmd AutoRun state (DOSKEY
aliases, `cd` in init.cmd, etc.) running in the wrapper rather than
the user's shell, since AutoRun is per-process.

Run the shell value directly. If it contains whitespace, split on
whitespace into argv. Bare `cmd.exe` is resolved via %COMSPEC% which
is the documented path to the current command processor; other bare
values are left to PATH resolution in Command.startWindows.

The simple whitespace split does not honor Windows CLI quoting rules.
Users who need quoted arguments should use the direct command form.

Also skip the termios focus timer on Windows since Windows has no
termios; the focusGained callback was starting a timer whose callback
would then do nothing.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-23 14:31:06 +09:00
Alessandro De Blasis
08a2d9b224 build: share combineArchives and fix internal archive names
Extract CombineArchivesStep.zig so both GhosttyLib and GhosttyLibVt
use the same archive-combining logic. Uses libtool on Darwin and the
cross-platform combine_archives build tool elsewhere.

Renames the internal library's fat archive outputs from ghostty to
ghostty-internal, matching the pkg-config rename from PR 12214.
2026-04-23 05:47:28 +02:00
Alessandro De Blasis
a10854654d build: disable ubsan in C deps for MSVC static linking
Zig's ubsan runtime cannot be bundled on Windows (LNK4229),
leaving __ubsan_handle_* symbols unresolved when the static
archive is consumed by an external linker like MSVC link.exe.

freetype, glslang, spirv-cross, and highway already suppress
ubsan unconditionally. Add MSVC-conditional suppression to the
seven C dependencies that were missing it: harfbuzz, libpng,
dcimgui, wuffs, oniguruma, zlib, and stb.

The fix is gated on abi == .msvc so ubsan coverage is preserved
on Linux and macOS where bundle_ubsan_rt works.
2026-04-23 05:23:15 +02:00
Alessandro De Blasis
94e638d084 build: produce fat static archive on all platforms
The static libghostty archive previously only bundled vendored
dependencies on macOS (via libtool). On Windows and Linux the
archive contained only the Zig-compiled code, leaving consumers
to discover and link freetype, harfbuzz, glslang, spirv-cross,
simdutf, oniguruma, and other vendored deps separately.

Now all platforms produce a single fat archive:
- macOS: libtool (unchanged)
- Windows: zig ar qcL --format=coff (LLVM archiver with the L
  flag to flatten nested archives; MSVC's lib.exe cannot read
  Zig-produced GNU-format archives)
- Linux: ar -M with MRI scripts (same as libghostty-vt)

This makes the static library self-contained for consumers like
.NET NativeAOT that link via the platform linker (MSVC link.exe)
and need all symbols resolved from a single archive.
2026-04-23 05:23:15 +02:00
Jeffrey C. Ollie
db210e4d7f windows: disable C++ ubsan regardless of ABI (#12381)
Widens the existing `-fno-sanitize=undefined` gate from `abi == .msvc`
to `os.tag == .windows`. The same undefined `__ubsan_handle_*` link
errors from simdutf/highway also reproduce on Windows GNU ABI, and the
fix is identical.

Part of the Win32 apprt upstreaming series (see discussion #2563 /
mattn/ghostty#1).
2026-04-22 20:55:13 -05:00
Yasuhiro Matsumoto
5c4ab6c0de build: pass zig exe path to combine_archives
`combine_archives` spawns `zig ar -M` to combine static archives via
an MRI script. It hard-coded the command name `"zig"` and relied on
the binary being on `PATH`, which fails on Windows when the build is
driven by an absolute zig.exe path (common in CI and in Scoop/winget
installs where PATH isn't populated at build time). The failure
surfaces as `error: FileNotFound` from `Child.spawn`.

Pass `b.graph.zig_exe` as the first argument so the tool always uses
the exact zig binary that is driving the build, matching how other
build tools in this repo spawn zig subcommands.
2026-04-23 09:59:41 +09:00
Yasuhiro Matsumoto
83a3e5aba7 windows: disable C++ ubsan regardless of ABI
The existing `-fno-sanitize=undefined` flag was gated on `abi == .msvc`
to avoid undefined `__ubsan_handle_*` references from simdutf/highway.
The same linker error reproduces on Windows GNU ABI for the same
reason: the Zig-bundled libraries don't provide a matching UBSan
runtime for these C/C++ objects in our build configurations.

Widen the condition to `os.tag == .windows` so both MSVC and GNU
Windows targets skip ubsan for these C++ deps.
2026-04-23 09:59:12 +09:00
Qwerasd
50869952af font/opentype: use packed struct for glyf point flags
Also fixes a logic bug where we weren't counting the length of x
coordinates and y coordinates correctly when we had repeated flags.
2026-04-22 13:40:24 -04:00
Yasuhiro Matsumoto
5a84afef29 address review: collapse DllMain into a single struct
Per review feedback (#12373), fold the nested `if/else if/else` into a
single Windows-gated struct whose handler picks up the abi difference
via a comptime check. This removes the duplicated `const BOOL = ...`
block that the two per-abi structs shared.
2026-04-23 02:17:04 +09:00
Yasuhiro Matsumoto
2d4d47ed82 windows: provide DllMain stub for non-MSVC ABI
Part of preparation for upstreaming a Win32 application runtime
(see discussion #2563). This is one of three small build-related
fixes that unblock the Windows GNU-ABI library build.

When targeting Windows with GNU ABI, the existing `DllMain` declaration
falls through to `void` (a type), which Zig stdlib's `start.zig` then
attempts to call as a function via `root.DllMain(...)` - producing the
compile error "type 'type' not a function".

Restructure the conditional so that:
  - non-Windows builds keep `DllMain = void`
  - Windows + MSVC keeps the existing CRT-init handler (unchanged)
  - Windows + non-MSVC gets a no-op `BOOL` handler

This unblocks `zig build -Dtarget=native-native-gnu -Dapp-runtime=none`
on Windows.
2026-04-23 00:42:23 +09:00
Qwerasd
d778be20dd font/opentype: add glyf table entry validation
We want to have this for the glyph protocol so that we can validate
passed glyf data in libghostty without having to link freetype or
anything like that.
2026-04-21 19:27:54 -04:00
Claude
e9a196c67b build(xcframework): exclude libghostty-vt headers from GhosttyKit
The GhosttyKit xcframework previously shipped the entire include/
directory, which pulled in the libghostty-vt headers under
include/ghostty/. Because those headers are not referenced from the
ghostty.h umbrella, Clang's module system emitted "umbrella header for
module 'GhosttyKit' does not include header 'ghostty/vt/*.h'" warnings
in Xcode builds.

Stage only ghostty.h and module.modulemap via addWriteFiles so the
xcframework Headers directory contains exactly the GhosttyKit API,
mirroring the pattern used in GhosttyLibVt.xcframework.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 14:43:21 +02:00
Lukas
afdae7293a macos: add pid and tty properties to AppleScript terminal and App Intents TerminalEntity (#11922) 2026-04-20 18:10:57 +02:00
Mitchell Hashimoto
0069e28cc6 libghostty: expose the APC max byte limits 2026-04-20 08:57:51 -07:00
Mitchell Hashimoto
0509f00ad2 terminal/apc: introduce a max_bytes parameter to prevent DoS 2026-04-20 08:53:02 -07:00
Mitchell Hashimoto
83027407e6 terminal: fix memory leak that could happen with invalid Kitty image cmd 2026-04-20 08:45:41 -07:00
Christo Wilken
9a9002202b macos: add pid and tty properties to AppleScript terminal class
Expose the foreground process PID and TTY device path as read-only properties on the AppleScript terminal class and App Intents TerminalEntity. This enables reliable process-to-terminal mapping for automation tools when multiple terminals share the same CWD.

Closes #11592
Closes #10756

Session: 019d341c-a165-7843-a2f7-2f426114cf17
2026-04-20 15:16:03 +02:00
Mitchell Hashimoto
dcc39dcd40 android: Avoid referencing POSIX shared memory functions (#12341)
Stop trying to use POSIX shared memory functions such as `shm_open` on
Android as it's unsupported and the platform libc does not have those
symbols.

This avoids an error such as the below when trying to use
`libghostty-vt` on Android:

> dlopen failed: cannot locate symbol "shm_open" referenced by [..]
2026-04-19 15:21:26 -07:00
Fredrik Fornwall
adb0d793af android: Avoid referencing POSIX shared memory functions
Stop trying to use POSIX shared memory functions such as
`shm_open` on Android as it's unsupported and the platform libc does not
have those symbols.

This avoids an error such as the below when trying to use
`libghostty-vt` on Android:

> dlopen failed: cannot locate symbol "shm_open" referenced by [..]
2026-04-19 23:44:37 +02:00
Kat
8a6c664686 Fix typo in i18n_locales.zig. 2026-04-20 01:22:09 +10:00
Kat
28b7ef12c3 i18n: add Belarusian translation (be) (#12284)
This PR adds Belarusian (be) language support to Ghostty.

## Changes

- `po/be.po` — new Belarusian translation file (80 strings)
- `src/os/i18n_locales.zig` — added `be` locale
- `CODEOWNERS` — added `/po/be.po @ghostty-org/be_BY`

## Notes

Terminology was cross-referenced with:
- KDE Belarusian translations (l10n.kde.org)
- qBittorrent Belarusian translation
- far2l Belarusian translation
- Ubuntu Belarusian Translators Dictionary
2026-04-19 14:48:32 +00:00
Mitchell Hashimoto
815ccb060b terminal: fix viewport pin during resize reflow
Maybe related to #12298?

When Screen resize forwards the active cursor into PageList reflow, a
history-pinned viewport can be remapped into the active area before the
preserved-cursor grow step finishes. The old code kept treating that
viewport as a history pin during the intermediate grow calls, which left
too few rows beneath the pin and tripped the viewport integrity checks.

Fix this by normalizing the viewport back to active as soon as reflow
moves the pinned row into the active area. Add a Screen-level regression
test that exercises the full resize path with bounded scrollback and
wrapped rows, and document the setup so the unwrap and viewport
transition are clear.
2026-04-15 13:59:54 -07:00
Mitchell Hashimoto
e51de8b58f libghostty: Remove all libc++ and libc++ ABI dependencies
This updates simdutf to my fork which has a SIMDUTF_NO_LIBCXX option
that removes all libc++ and libc++ ABI dependencies. 

From there, the hand-written simd code we have has been updated to also
no longer use any libc++ features. Part of this required removing utfcpp
since it depended on libc++ (`<iterator>`).

libghostty-vt now only depends on libc.
2026-04-15 10:27:05 -07:00
Mitchell Hashimoto
9c49c34356 benchmark: add AGENTS, improve UTF-8 synthetic data
This updates our synthetic generator for UTF-8 to expose:

  - Flags to change 1/2/3/4-byte UTF-8 character distribution
  - Flags to have only printable characters so we can benchmark
    pure UTF-8 vs our control sequence finder.
  - Flags to have invalid characters so we can benchmark our error
    handling.

This also adds an AGENTS.md to src/benchmark so agents can do the right
thing more easily.
2026-04-15 08:28:36 -07:00
illia krauchanka
4f3a9cb0c6 i18n: add Belarusian translation (be) 2026-04-14 17:27:37 -03:00
Jeffrey C. Ollie
3a9ae7a0f2 decbkm: expose DECBKM to libghostty-vt 2026-04-12 16:04:16 -05:00
Jeffrey C. Ollie
de4992c2b2 decbkm: use if statements instead of named blocks 2026-04-12 15:40:55 -05:00
Jeffrey C. Ollie
203895e3f7 decbkm: address review comments
* Don't alter Kitty keyboard protocol responses. Kitty does not support
  DECBKM so KKP doesn't take DECBKM into consideration.
* Make better use of the function key lookup to control what sequence is
  returned when backspace is pressed using the legacy encoding.
2026-04-12 15:40:54 -05:00
Jeffrey C. Ollie
aea70a5f7c core: implement backarrow key mode (DECBKM) - mode 67
This mode allows programs to modify the code that the `backspace`
key (backarrow key in DEC parlance) sends. If this mode is
`off`/`false`/`reset` (the default, the same as before this PR), we
send the byte `0x7f`. If this mode is `on`/`true`/`set` we send the
byte `0x08`.
2026-04-12 15:40:54 -05:00
Mitchell Hashimoto
94cd3da8bc build: add ghostty-internal pkg-config modules (shared + static) (#12214)
## Summary
Mirror the `libghostty-vt-static` pkg-config pattern from #12210 for the
internal library.

- Add `ghostty-internal.pc` (shared, `-lghostty`) and
`ghostty-internal-static.pc` (static, direct archive reference) so
consumers can discover either variant via pkg-config
- Named `ghostty-internal` to distinguish from the public
`libghostty-vt` API
- Static module points at the platform-correct archive name
(`ghostty-static.lib` on Windows, `libghostty.a` elsewhere)
- pkg-config files are generated during shared builds and installed via
`GhosttyLib.install()`

## Test plan

- [x] `zig build` succeeds (default target)
- [x] `ghostty-internal.pc` and `ghostty-internal-static.pc` appear in
`zig-out/share/pkgconfig/`
- [x] Static `.pc` points at `ghostty-static.lib` (Windows) /
`libghostty.a` (Unix)
- [x] Shared `.pc` uses standard `-L -l` flags
- [x] Existing `libghostty-vt` pkg-config files are unaffected
2026-04-12 13:18:03 -07:00