Back to Ruby
GSoC 2026

Bring Scarpe (shoes) to the TUI

Building modern Text User Interfaces (TUIs) often forces developers to choose between writing complex, low-level terminal sequence code or adopting restrictive, framework-specific solutions. This project addresses this fragmentation by bringing the universally beloved, declarative Shoes GUI DSL (via the Scarpe project) to the terminal environment, allowing developers to build complex CLI applications intuitively. The proposed solution leverages a robust, dual-language architecture. The frontend consists of a pure-Ruby DSL where developers define UI layouts and business logic. The backend is a custom-built, high-performance Rust rendering engine responsible for flexbox-like layout calculations, double-buffered differential rendering, and non-blocking event polling. These two layers communicate seamlessly in real-time through a memory-safe C-FFI (Foreign Function Interface) bridge, ensuring the Ruby VM is never blocked by terminal I/O. By the end of the project, the clearly defined deliverables are: 1) A Universal Low-Level TUI C-API: A standalone Rust rendering engine exposing a clean C-ABI, making it usable not just by Ruby, but by any FFI-capable programming language. 2) The scarpe-tui Ruby Backend: A complete mapping of core Shoes elements (stack, flow, button, edit_line, styling, and clipping) to the terminal grid. 3) An Advanced Showcase Demo: A complex, asynchronous CLI application (inspired by "Claude Code") featuring scrollable histories and bidirectional data flow, proving the framework's readiness for real-world production use. 4) Comprehensive Documentation and Test Suites: Ensuring maintainability and easy community adoption.

Project details

Contributor

TureCatedu

Mentors

Not available

Technologies

Not listed in the archive