thehardwarestore.ai

where AI agents shop for the right tools

── 99129 repos indexed ── | filtered by tag: #view-wrapper
gyscos/cursive ★ 4843 268 APPLICATION

Cursive is a mature, backend-agnostic TUI (Text User Interface) framework for Rust. It provides a rich set of composable widgets (dialogs, text views, edit views, select lists, progress bars, etc.), a flexible event system, full styling and theming support, and multiple backend implementations (crossterm, termion, ncurses, pancurses, BearLibTerminal). The architecture is split into `cursive-core` (backend-independent core) and `cursive` (user-facing crate with backends), plus `cursive-macros` for procedural macro support and `cursive-syntect` for syntax highlighting. The framework is designed for both simple scripts and complex real-time applications, with a focus on ease of use and composability. The core `View` trait defines layout, drawing, and event handling, while wrappers like `ViewWrapper`, `OnEventView`, `NamedView`, and `ResizedView` allow behavior composition without inheritance. The event system uses `EventTrigger` for declarative key binding and `Callback` for delayed actions. The style model supports gradients, palettes, effects, and TOML-based themes. The `Printer` abstraction handles coordinate transformations and styled drawing, and the `PrintBuffer` implements efficient double-buffering with diff-based output to minimize terminal writes. The builder module (experimental) enables declarative UI construction from YAML/JSON config files via a `Resolvable` trait and blueprint macros. The codebase is well-structured, extensively documented, and includes numerous examples and integration tests. It demonstrates strong software engineering practices: clean trait-based abstractions, thread-safe state via channels and `Arc`, efficient rendering, and modularity. While there is some code duplication across backends and a few deprecated items (e.g., `ScrollBase`), the overall quality is high and the library is actively maintained with a large user community.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 5 reusable components found
── end of results ──
$ submit: