tuxtui-core

Crates.iotuxtui-core
lib.rstuxtui-core
version0.1.0
created_at2025-10-17 21:38:49.564465+00
updated_at2025-10-17 21:38:49.564465+00
descriptionCore types and traits for tuxtui TUI library
homepagehttps://github.com/TIVerse/tuxtui
repositoryhttps://github.com/TIVerse/tuxtui
max_upload_size
id1888469
size172,778
Eshan Roy (eshanized)

documentation

https://docs.rs/tuxtui

README

tuxtui-core

Crates.io Documentation License: MIT

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 support
  • layout-cache: Enable LRU caching for layout calculations
  • serde: Enable serialization/deserialization
  • palette: Enable advanced color manipulation with HSL/HSLuv
  • portable-atomic: Use portable atomics for no-std compatibility
  • anstyle: Enable anstyle conversions
  • underline-color: Enable colored underlines
  • scrolling-regions: Enable terminal scrolling region support

Example

use tuxtui_core::{buffer::Buffer, geometry::Rect, style::{Color, Style}};

let mut buffer = Buffer::empty(Rect::new(0, 0, 10, 5));
let style = Style::default().fg(Color::Blue);
buffer.set_string(0, 0, "Hello", style);

Usage in Libraries

Widget libraries can depend on tuxtui-core without pulling in heavy backend dependencies:

[dependencies]
tuxtui-core = { version = "0.1", default-features = false }

License

MIT - See LICENSE for details.

Copyright (c) 2024 Eshan Roy eshanized@proton.me

Tonmoy Infrastructure & Vision

Commit count: 0

cargo fmt