Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
3.1 kB
Markdown
Rio Terminal Integration #
Overview #
Rio Terminal is a modern, GPU-accelerated terminal emulator written in Rust with WebAssembly support. It can replace xterm.js in the Electron shell windows.
Why Rio? #
Performance #
- GPU Hardware Acceleration: Uses WebGPU for smooth rendering
- Near-native performance: Built with Rust + WebAssembly
- Fast startup: Significantly faster than xterm.js
Visual Features #
- 24-bit True Color: 16 million colors vs xterm's 256
- Image Support: Sixel and iTerm2 protocols (inline images)
- Font Ligatures: Better readability for code
- RetroArch Shaders: CRT effects, custom visual styling
- Adaptive Themes: Auto light/dark mode
Advanced Features #
- Splits & Panels: Native terminal multiplexing
- Vi Mode: Vim-style keyboard navigation
- Kitty Protocol: Advanced keyboard input support
- Shell Integration: Enhanced prompt/command tracking
Integration Options #
Option 1: Rio Web Version (Recommended) #
Rio provides a WebAssembly build that can be embedded directly in Electron:
// Replace xterm.js renderer with Rio WASM
import init, { Terminal } from './rio-wasm/rio_terminal.js';
await init(); // Initialize WASM
const terminal = new Terminal(container);
terminal.connect(ptyProcess);
Pros:
- Single bundle (no native dependencies)
- Works across all platforms
- GPU-accelerated rendering
- Modern web standards (WebGPU)
Cons:
- Larger initial bundle size (~2-3 MB WASM)
- Requires WebGPU browser support
Option 2: Native Rio (via node-pty) #
Use Rio's native binary as the terminal emulator:
# Install Rio natively
cargo install --git https://github.com/raphamorim/rio
# Launch from Electron
spawn('rio', ['--command', shellCommand], { ... });
Pros:
- Maximum performance (native Rust)
- All Rio features available
- Separate process isolation
Cons:
- Requires Rio installed on system
- Platform-specific binaries
- Less integrated UX (separate window)
Implementation Plan #
Phase 1: Evaluation #
Phase 2: Integration #
Phase 3: Migration #
References #
- GitHub: https://github.com/raphamorim/rio
- Website: https://rioterm.com
- WASM Build: Check
rio/frontends/rioterm-web/in repo - Features: https://rioterm.com/docs/features
Current Status #
Last updated: 2025-12-27