The Embeddable, Lossless Terminal Engine in Rust & Swift
Engineered to replace unstable legacy VT backends. Eliminates snapshot corruption, prevents memory leaks, and delivers native 120 FPS Metal rendering across macOS, iOS, and server runtimes.
brew install --cask alex09x/apps/tako ╭ tako git:(main*) ~2 ?2 · 3.0s · ✗ 1
╰ ❯ cargo run --example terminal_session
[00:00:00.001] INIT TakoCore Engine instantiated (allocation bounded: 64MB buffer cap)
[00:00:00.003] METAL CAMetalLayer pipeline initialized: 120Hz display sync
[00:00:00.005] VT100 SGR mouse tracking & 24-bit TrueColor enabled
┌─── TakoCore Terminal State ──────────────────────────────────────────┐
│ Columns: 120 Rows: 36 Active Screen: Primary Cursor: [14, 2] │
│ Parser throughput: 1.48 GB/s Draw calls / frame: 1 instanced Metal │
│ Event ringbuffer: 0 pending (zero unbounded accumulation) │
└──────────────────────────────────────────────────────────────────────┘
╭ tako git:(main)
╰ ❯ echo -e "\e[38;2;244;88;28mZero Ghostty corruption, zero memory leaks.\e[0m"
Zero Ghostty corruption, zero memory leaks.
╰ ❯ █
Designed for Apple Silicon
Beyond the core headless Rust engine, TakoCore includes a full native AppKit/UIKit UI layer. Metal shaders, CoreText glyph caching, and frictionless macOS integration.
Native Dictation Support
Zero acoustic drops. Full integration with Apple keyboard Dictation and active NSTextInputContext lifecycle.
Kinetic Touch Scrolling
Smooth momentum scrolling with precise alternate-screen scroll wheel emulation for vim, less, and tmux.
Cyrillic & Dead-Key Parity
Verified physical key mappings so shortcuts like Ctrl+C and modifiers work consistently across all keyboard layouts.
Built for Mission-Critical Terminal Runtimes
Legacy terminal libraries suffer from memory fragmentation, snapshot drift, and crash bugs in high-throughput environments. TakoCore was re-architected from the ground up.
Memory-Safe Rust Engine
Zero undefined behavior, zero SIGSEGV crashes. Rigorous allocation bounds prevent memory leaks on continuous multi-megabyte ANSI/OSC bursts.
Lossless State Checkpointing
Instantly serialize the entire active grid, scrollback buffer, cursor coordinates, and active terminal modes into a compact wire format and restore with 0 byte drift.
Metal GPU Pipeline (120 FPS)
Hardware-accelerated glyph caching and instanced batch rendering via Apple Metal on macOS and iOS, delivering buttery-smooth 120Hz ProMotion updates.
AppKit & UIKit Native UI
Ready-to-use TakoTerminalNSView supporting full NSTextInputClient, IME, CJK, dead keys, macOS keyboard Dictation, and kinetic trackpad gestures.
Universal C ABI
Dead-simple integration with Go, Zig, C, and Python backends. Includes prod_vt_discard_events() for host servers that intentionally drain event notifications.
Modern Terminal Specs
Full support for 24-bit TrueColor, SGR extended coordinates, OSC 8 clickable URLs, bracketed paste mode, alternate screen buffers, and Unicode grapheme clustering.
Zero-Copy, Layered Architecture
TakoCore cleanly separates stream decoding, grid mutation, lossless checkpointing, and GPU drawing into deterministic, decoupled layers.
macOS Desktop
iOS Native
Headless PTY Server
TakoCoreUI (Swift) TakoTerminalNSView • NSTextInputClient • Mouse/Keyboard delegate
TakoCore C ABI prod_vt_new() • prod_vt_write() • prod_vt_discard_events()
SIMD-accelerated UTF-8 stream decoder
Zero-fragmentation ring buffer
Lossless delta & palette serialization
120Hz GPU texture atlas
Engine & Pipeline Performance Matrix
Grounded in measured data on Apple Silicon M-series (macOS Darwin) using Criterion and real-world streaming workloads. No synthetic claims — reproducible directly from the repository.
20 MB File Streaming
End-to-end `cat` from PTY to display (~181 MB/s)
Viewport FFI Transfer
200×50 cells (155x speedup over unpacked 74.4 ms)
Soft-Wrap Reflow
Instant reflow resizing 80 cols down to 40 cols
Checkpoint Drift
100% lossless state serialization in 0.12 ms
End-to-End File Streaming
Lower is faster
Time to stream and render a 20 MB log file (cat large.log) through PTY, VT parser, and GPU layer.
Grid-to-GPU FFI Transfer
Lower latency is betterLatency to package 200×50 cells (10,000 glyph records) across FFI into GPU memory per rendered frame.
Engine Workload Breakdown (benches/throughput.rs)
Criterion micro-benchmarks feeding continuous byte patterns into an 80×24 terminal on Apple Silicon M-series:
| Benchmark Workload | Measured Throughput | Real-World Representation |
|---|---|---|
| feed/sgr_heavy | 29 MiB/s | Heavily styled compiler output, `ls --color`, RGB 24-bit truecolor logs |
| feed/wide_chars | 17 MiB/s | CJK double-width characters, emojis, and combined glyph pair bookkeeping |
| feed/plain_text | 11 MiB/s | Raw unformatted ASCII streaming directly into the active grid ringbuffer |
| feed/cursor_heavy | 8 MiB/s | Interactive full-screen TUI repaints (`htop`, `neovim`, `lazygit`, curses) |
| resize/reflow_80_to_40 | 227 µs | Full soft-wrapped text reflow upon window resize without dropping wrapped history |
| state/checkpoint_v3 | 0.12 ms | Compact binary wire serialization (42.8 KB) with 0 bytes drift (100% lossless) |
Architectural Capability Matrix
How TakoCore compares against other modern terminal engines across core production requirements:
| Capability | TakoCore (v0.1.2) | Ghostty (Zig) | Alacritty (Rust) | iTerm2 (Obj-C) |
|---|---|---|---|---|
| Core Architecture | Embeddable Rust library + Swift/Metal UI | Zig monolithic binary + Swift shell | Rust monolithic app | Objective-C application |
| Lossless State Migration | 100% Lossless (0 bytes drift) | Unsupported (ephemeral) | Unsupported (ephemeral) | Partial session restore |
| macOS Keyboard & Dictation | Verified NSTextInputClient & recognizer | Custom C-bridge | Basic IME support | Full macOS Cocoa IME |
| Memory Bounding | Strictly bounded ringbuffer (0 leaks) | Transient OSC queues (~20 MB) | Strictly bounded ringbuffer | Unbounded spikes (250 MB+) |
| Metal Rendering Pipeline | CAMetalLayer with ProMotion (120 Hz) | Metal / OpenGL (120 Hz) | OpenGL (VSync locked) | Metal / CPU hybrid |
Reproducing the Empirical Benchmarks
You can verify every metric on your own machine. Clone the repository and execute the throughput benchmark suite via Criterion:
git clone https://github.com/alex09x/tako && cd tako
cargo bench --bench throughput Get Started with Tako
Install the ready-to-run desktop terminal app via Homebrew Cask, or embed TakoCore directly into your own applications using SwiftPM, Cargo, or C ABI.
# Install Tako.app and the CLI wrapper via Homebrew
# 1. Add personal Homebrew tap
brew tap alex09x/apps
# 2. Install Tako macOS App & CLI symlink
brew install --cask tako
# Or install in a single command:
brew install --cask alex09x/apps/tako
# Run Tako from anywhere
tako Latest Stable Release
Official release builds include multi-platform XCFramework archives for macOS and iOS, validated against Apple's strict Swift toolchain and code-signing requirements.
TakoCore v0.1.2
LatestGit Revision: a6198bb230724a8048426f44d6d161388793755d
b7fb21391894e5a8d50caf3a1be0fb7576a28089e84fd223a5d4bccadc2689ab
Release Highlights:
- Swift Toolchain Conformance: Cleaned
NSTextInputClientprotocol conformance into a dedicated extension without@preconcurrencyattributes. - Actor Isolation Safety: Resolved concurrency variable capture across
Task { @MainActor in ... }boundaries in cursor blink timer. - Focused Regression Suite: 1,553 unit & integration tests passing cleanly across macOS and iOS targets.