retroglyph-core 0.5.0

A 2D pseudographic terminal library -- core types, no backend
Documentation

retroglyph-core

crates.io docs.rs coverage license

The no_std-compatible foundation of retroglyph: grid, tile, style, color, text, terminal, and event types, plus the Backend trait and a dependency-free Headless test backend. Platform backends (retroglyph-crossterm, retroglyph-software) and drawing helpers (retroglyph-widgets) are separate crates that depend on this one.

Quick start

[dependencies]
retroglyph-core = "0.1"
# fn main() -> Result<(), core::convert::Infallible> {
use retroglyph_core::{Terminal, Color, Style, backend::Headless};

let mut term = Terminal::new(Headless::new(80, 24));
term.draw(|s| s.put((5, 5), '@', Style::new().fg(Color::GREEN)))?;
# Ok(())
# }

Headless never touches a real terminal or window, so this runs anywhere: including this README's own doctest (see src/lib.rs's #[cfg(doctest)] include). For a real backend, add retroglyph-crossterm or retroglyph-software and see the workspace README's quick start.

See docs.rs for the full API, or the workspace README for the crate list and a real backend quick start.