mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-14 18:01:58 +00:00
This introduces a `-Dvt-features` build option for libghostty-vt that compiles out optional feature areas, primarily so size-conscious embedders (e.g. wasm) can significantly trim the binary. The flag is similar to `-Dcpu`, `+feature` or `feature` to enable it, `-feature` to disable, magic word `all` to turn all features on or off. Example: `-Dvt-features=-all,+render-state` builds only the render state API. ### Sizes | Build | Bytes | Brotli | |---|---|---| | default (all features) | 876,500 | 218,309 | | web interactive (`-all,+render-state,+input-encode,+selection,+color,+grid-introspection`) | 661,119 | 168,994 | | read-only viewer (`-all,+render-state`) | 537,441 | 132,858 | | bare VT core (`-all`) | 515,422 | 125,756 | | xterm.js browser bundle (incl. renderers) | 488,663 | 99,311 | | @xterm/headless | 182,672 | 39,651 | Note: xterm versions are stable as of this commit.