- C 85.1%
- Python 3.3%
- CMake 2.2%
- C++ 2.1%
- WGSL 2.1%
- Other 5%
| .githooks | ||
| .github | ||
| .woodpecker | ||
| assets | ||
| bindings | ||
| buck-build-tools | ||
| build-tools | ||
| demo | ||
| docs | ||
| include | ||
| poc | ||
| qa-tools | ||
| src | ||
| test | ||
| tools | ||
| .buckconfig | ||
| .buckroot | ||
| .clang-format | ||
| .gitattributes | ||
| .gitignore | ||
| BUCK | ||
| CMakeLists.txt | ||
| DEPENDENCIES.md | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| Makefile | ||
| Makefile.2 | ||
| Makefile.buck | ||
| README.md | ||
Note: This is the repo of the new rewrite of yetty code. The old yetty code, is at https://github.com/zokrezyl/yetty-poc
Yetty
GPU-accelerated terminal with rich content. Pure C. Any language.
License: Business Source License 1.1, applying to Yetty's own code only. Non-production use is free; production use requires a commercial license. See LICENSE. Bundled third-party components keep their own (mostly permissive) licenses — see DEPENDENCIES.md.
Status: Early alpha — actively rewriting established concepts for efficiency.
Vision
Terminals are stuck in the 1970s — text, maybe colors, that's it. Meanwhile, the rest of computing evolved to support rich graphics, animations, and interactive content.
Yetty changes this. A WebGPU-powered terminal where plots, images, videos, documents, and interactive widgets live alongside text — all scrolling together as one unified surface.
Design Principles
- Pure C, FFI-first — no hidden costs, bind from Rust, Go, Python, Swift, Kotlin
- Figure-based composition — text and graphics share one z-ordered surface
- Composable primitives — simple (SDF shapes) and complex (figures)
- Dirty-driven pipeline — nothing runs unless something changed
- GPU resource binding — all buffers and textures packed into minimal GPU bindings
Architecture
Terminal
├── content layer terminal text + row-anchored ydraw content
│ ├── text grid libvterm (VT100/xterm)
│ └── ydraw canvas SDF primitives: circles, boxes, lines, glyphs
└── root yfigure generic compositor with z-ordered figures
└── yplot · yimage · yvideo · ygui · ymgui · yrdawn · ygrid ·
ydiagram · ysvg · ypdf · yvnc · ...
A figure is the generic composition unit in yetty: it has position,
size, dirty state, GPU resources, and z-order, and figures may contain other
figures. The old fixed terminal-layer stack has been collapsed into one content
layer for text + row-anchored ydraw content, plus a root yfigure compositor for
rich content. Conceptually this still gives layered output, but the layering now
comes from render order and figure z-order.
Yetty is built from ~70 small C modules. See the Architecture & Module Map for the complete inventory and how the pieces connect.
Rich Content Figures
Figures are composites that integrate seamlessly with the terminal grid. They scroll with text, share the GPU resource model, and can be nested.
| Figure | Description | Status |
|---|---|---|
| yplot | GPU-accelerated charts and data visualization | ✅ Working |
| yimage | Inline images (PNG, JPEG, WebP) | ✅ Working |
| ygui | Interactive widgets (buttons, menus, tables, dialogs) | ✅ Working |
| ymgui | Compositor-side GUI figure | ✅ Working |
| yvnc / ydvnc | VNC client + desktop viewer | ✅ Working |
| ydiagram | Mermaid diagrams (parser + layout + render) | ✅ Working |
| ysvg | SVG (Tiny 1.2) rendering | ✅ Working |
| ypdf | PDF rendering (via pdfio) | ✅ Working |
| ycat | MIME-dispatched content viewer | ✅ Working |
| yvideo | Video playback (H.264) | 🚧 Beta |
| ymarkdown | Markdown rendering/editing (WYSIWYG) | 🚧 Porting |
| yrich | Documents, spreadsheets, presentations | 🚧 Porting |
| ymesh | 3D mesh rendering | 🚧 Early |
| ythorvg | SVG and Lottie animations (ThorVG) | 📋 Planned |
Beyond the desktop
Yetty is more than a renderer — it speaks to remote machines and embeds a web stack.
| Capability | Module(s) | Status |
|---|---|---|
| SSH / Telnet | yssh, ytelnet | ✅ Working |
| Remote GPU rendering | yrdawn (client + server over OSC) | ✅ Working |
| RPC control plane | yctl | ✅ Working |
| Web rendering | ylexbor (lexbor + QuickJS), ybrowser | 🚧 Early |
| RISC-V VM console | yqemu, embedded TinyEMU | 🚧 Early |
Core Features
| Feature | Description |
|---|---|
| MSDF fonts | Crisp, scalable text at any zoom level |
| Raster fonts | Color emoji and bitmap glyphs |
| SDF primitives | GPU-rendered shapes with anti-aliasing |
| Tiling workspaces | Multiple terminals with window management |
| Rolling scroll | O(1) scroll — primitives never update coordinates |
| ytrace logging | Switchable trace points, near-zero cost when off |
Platforms
| Platform | Status |
|---|---|
| Linux | ✅ Working |
| macOS | ✅ Working |
| Android | ✅ Working |
| WebAssembly | ✅ Working |
| Windows | 🚧 In progress |
| iOS / tvOS | 🧪 Experimental |
Building
Build targets are defined in the Makefile. List available targets with:
make
Common build commands:
# Desktop (Linux/macOS) - release build with tracing
make build-desktop-ytrace-release
# WebAssembly
make build-webasm-ytrace-release
# Android (ARM)
make build-android-ytrace-release
# Android emulator (x86_64)
make build-android_x86_64-ytrace-release
Usage
# Run with default shell
./build-desktop-ytrace-release/yetty
# Run with specific command
./build-desktop-ytrace-release/yetty -e 'htop'
Documentation
Start with the Architecture & Module Map for the full picture, then dive into a subsystem.
Overview
| Document | Description |
|---|---|
| Architecture & Module Map | The ~70 modules, grouped, with maturity |
| Design Overview | Core decisions and rationale |
| Contexts | Bootstrap chain and context structs |
Rendering
| Document | Description |
|---|---|
| Layered Rendering | Virtual layers, direct-to-target rendering, yfigures, scrolling, alt-screen |
| WebGPU Architecture | WebGPU object ownership |
| WebGPU Concepts | WebGPU primer (C) |
| GPU Resource Binding | Buffer packing and atlas textures |
| Render Pipeline | Dirty-driven upload and recompilation |
| ydraw | Primitives, figures, and scrolling model |
| Font System | Glyph rendering and atlas |
| yfsvm | Shader expression VM |
| Enhanced Plots | yplot internals |
Terminal & platform
| Document | Description |
|---|---|
| Terminal Screen | Screen state and compositing |
| Platform Abstraction | PTY, event loop, per-OS layout |
| Platform PTY | PTY backends |
| Platform Pipe | Cross-thread input pipe |
| Coroutines | yco / yevent concurrency |
| yvnc | VNC client/server |
Codegen & bindings
| Document | Description |
|---|---|
| yclass | Annotation-driven classes, RPC, and the binding model |
| FFI Generation | Per-language binding emitters |
Conventions & tooling
| Document | Description |
|---|---|
| C Coding Style | Naming, structs, memory rules |
| Result Types | Typed error propagation |
| ytrace | Logging and tracing |
| Buck2 | Buck2 build notes |
Contributing
We're developing intensively and moving fast. Contributions welcome:
- Code and bug fixes
- Documentation improvements
- Testing (coverage is still limited)
- Ideas and feedback
Share suggestions on GitHub Discussions.
Dependencies
Core
- libvterm — VT100/xterm terminal emulation (vendored)
- Dawn — WebGPU implementation
- FreeType — Font rasterization
- GLFW — Cross-platform windowing
- libuv — Async I/O and event loop
- libco — Coroutines
- brotli — Bundled-asset compression
Content & remote
- pdfio — PDF parsing (ypdf)
- openh264 — H.264 video decode (yvideo)
- lexbor + QuickJS — HTML/CSS/JS web stack (ylexbor)
- libssh2 — SSH backend (yssh)
- LZ4 — Wire-stream compression (yface)
- cdb — Constant key/value database (ycdb)
- TinyEMU — RISC-V VM console (vendored)
Optional / planned
- ThorVG — SVG and Lottie rendering (wired in build; renderer in progress)
Dependencies use permissive licenses (MIT, BSD, Zlib, Apache-2.0); the optional
NetSurf integration (ynetsurf) is GPL and off by default. Yetty's BSL applies
only to its own code and does not relicense these components. Full list and
license terms: DEPENDENCIES.md.
Your terminal, unchained.