apps/mobile/modules/t3-terminal
| Name | Last commit message | Last commit date |
|---|---|---|
| .. | ||
README.md
T3 Mobile Terminal Native Module#
This local Expo module owns the native terminal surface for the mobile app.
The JavaScript contract is intentionally small:
- input from the native surface is emitted as
{ data: string } - resize from the native surface is emitted as
{ cols: number, rows: number } - remote PTY output is delivered by the existing
WsRpcClient.terminalRPC stream
Both platforms use upstream libghostty-vt for terminal state, parsing, reflow, and scrollback,
pinned to the same revision as the web terminal (native/libghostty-vt/VERSION). iOS links the
official XCFramework and draws the render state in UIKit (VTTerminalViewport). Android renders
compact snapshots produced by its JNI bridge on a Canvas view. Either way, the React Native screen
and RPC code stay platform-neutral.
Vendored Ghostty revision and license details are in THIRD_PARTY_NOTICES.md.
Refreshing libghostty-vt for iOS#
The checked-in Vendor/libghostty-vt/ghostty-vt.xcframework holds the iOS slices of the official
libghostty-vt release. To refresh it, run:
apps/mobile/modules/t3-terminal/scripts/vendor-libghostty-vt-ios.sh
The script verifies the upstream ZIP checksum and checks the release revision against the shared pin.
Rebuilding libghostty-vt for Android#
The checked-in Android shared libraries and headers are pinned to the revision recorded in
native/libghostty-vt/VERSION at the repository root. Set ANDROID_NDK_HOME and run:
apps/mobile/modules/t3-terminal/scripts/build-libghostty-android.sh
The script downloads Zig 0.17.0 when needed, checks out the pinned upstream Ghostty revision, and rebuilds all four Android ABIs with 16 KB page-size support.