Skip to content

Coming from ghostty-web

ghostty-webgpu has its own native API. Start with a working terminal and move the transport before changing appearance.

ghostty-webghostty-webgpu
Separate initialization and terminal constructionAwait Terminal.create, then await open
String input callbacksonData emits Uint8Array bytes
Canvas rendererAutomatic WebGPU, WebGL2, Canvas 2D and DOM selection
Fit addonFit to the sized host automatically
Font size and family optionsappearance.font, then setFont
Theme colorsTerminalTheme RGB objects and a 256-entry palette
Main-thread terminalMain entry or dedicated /worker entry

These mappings describe ghostty-web 0.4.0 and the current ghostty-webgpu checkout. Check the xterm.js mapping for more API names; the native API takes a different shape from the xterm-style facade.

Send onData bytes directly to your PTY. Set the socket to arraybuffer and pass binary output into write. The PTY client includes resize and disposal.

Use browser font loading for the main entry. Supply font URLs or bytes to the worker entry so its own font set can measure and render them.

URL detection, OSC 8 links and native widths are available. Search, images and ligatures remain planned. Worker link providers and finite synchronous hotkeys have capability limits. Compare current versions and renderer classes through the benchmark report.