Rust Terminal Emulation Patterns — for Claude Code Rust Terminal Emulation Patterns, iterm2-rs, community, for Claude Code, ide skills, Rust terminal emulation, PTY management, GPU rendering, alacritty_terminal, vte parsing, Claude Code

v1.0.0
GitHub

About this Skill

Rust Terminal Emulation Patterns is a skill that provides terminal state machine management, screen buffer handling, and custom sequence handling for AI coding agents.

Features

Handle VT100/VT220 escape sequences using alacritty_terminal
Manage PTYs with portable-pty for cross-platform compatibility
Render terminals using wgpu and glyphon for GPU acceleration
Parse VT sequences with vte for custom handling

# Core Topics

Wolfschanze-Berlin Wolfschanze-Berlin
[0]
[0]
Updated: 2/21/2026
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

Rust Terminal Emulation Patterns

Unlock efficient terminal emulation with Rust. Discover how AI agent skills benefit developers with VT100/VT220 escape sequences, PTY management, and GPU...

SKILL.md
Readonly

Rust Terminal Emulation Patterns

Terminal Emulation Stack

User Input (winit) → Input Handler → PTY Write
PTY Read → VT Parser (alacritty_terminal) → Terminal State
Terminal State → Renderer (wgpu + glyphon) → Screen

Key Libraries and Their Roles

alacritty_terminal (VT emulation)

  • Provides Term<T> — the terminal state machine
  • Handles VT100/VT220 escape sequences
  • Manages screen buffer, cursor, scrollback
  • Used in crates/terminal/src/alacritty.rs

vte (low-level VT parsing)

  • Byte-level VT sequence parser
  • Used for custom sequence handling beyond alacritty_terminal
  • Parser state machine with Perform trait

portable-pty (PTY management)

  • Cross-platform PTY abstraction
  • ConPTY backend on Windows
  • Used in crates/terminal/src/pty.rs

wgpu (GPU rendering)

  • WebGPU-based rendering backend
  • Device, surface, and render pipeline management
  • Used in crates/renderer/src/gpu.rs

glyphon + cosmic-text (text rendering)

  • Font loading and shaping via cosmic-text FontSystem
  • GPU text rendering via glyphon TextRenderer
  • Used in crates/renderer/src/text.rs

Crate Interaction Patterns

Terminal → Renderer

The renderer crate depends on the terminal crate to read terminal state:

  • Grid content (characters, attributes, colors)
  • Cursor position and style
  • Selection state
  • Scrollback buffer

Main App → All Crates

The iterm2-rs crate orchestrates:

  • Window creation (winit) → passes to renderer
  • PTY spawning → passes to terminal
  • Config loading → distributes to all crates
  • Event loop → dispatches input/resize/render

Split Pane Architecture

  • crates/terminal/src/pane.rs — Individual terminal pane (owns PTY + terminal state)
  • crates/terminal/src/tab.rs — Tab containing pane layout tree
  • Layout is a binary tree of horizontal/vertical splits

Tmux Control Mode

  • crates/tmux/src/parser.rs — Parses tmux control mode output
  • crates/tmux/src/events.rs — Tmux event types
  • crates/tmux/src/session.rs — Session and window management
  • Protocol: Line-based, commands prefixed with %

Anti-Patterns to Avoid

  • Do NOT block the winit event loop with synchronous PTY reads
  • Do NOT allocate per-frame in the render loop — reuse buffers
  • Do NOT mix anyhow and thiserror in the same crate
  • Do NOT handle raw VT sequences if alacritty_terminal already handles them
  • Do NOT create new windows outside the winit event loop

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is Rust Terminal Emulation Patterns?

Rust Terminal Emulation Patterns is a skill that provides terminal state machine management, screen buffer handling, and custom sequence handling for AI coding agents.

How do I install Rust Terminal Emulation Patterns?

Run the command: npx killer-skills add Wolfschanze-Berlin/iterm2-rs/Rust Terminal Emulation Patterns. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

Which IDEs are compatible with Rust Terminal Emulation Patterns?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add Wolfschanze-Berlin/iterm2-rs/Rust Terminal Emulation Patterns. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use Rust Terminal Emulation Patterns immediately in the current project.

Related Skills

Looking for an alternative to Rust Terminal Emulation Patterns or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI