tuxtui-core
Core types and traits for the tuxtui Terminal UI library.
Overview
tuxtui-core provides the foundational building blocks for terminal user interfaces:
- Style: Colors, modifiers, and styling primitives
- Text: Rich text with spans, lines, and paragraphs
- Buffer: Double-buffered terminal cell storage with efficient diffing
- Layout: Flexible constraint-based layout engine with caching
- Backend: Platform-agnostic terminal abstraction trait
- Theme: Themable UI components with serialization support
Features
std(default): Enable standard library supportlayout-cache: Enable LRU caching for layout calculationsserde: Enable serialization/deserializationpalette: Enable advanced color manipulation with HSL/HSLuvportable-atomic: Use portable atomics for no-std compatibilityanstyle: Enable anstyle conversionsunderline-color: Enable colored underlinesscrolling-regions: Enable terminal scrolling region support
Example
use ;
let mut buffer = empty;
let style = default.fg;
buffer.set_string;
Usage in Libraries
Widget libraries can depend on tuxtui-core without pulling in heavy backend dependencies:
[]
= { = "0.1", = false }
License
MIT - See LICENSE for details.
Copyright (c) 2024 Eshan Roy eshanized@proton.me
Tonmoy Infrastructure & Vision