Expand description
ยง๐ผ Overture
Overture is an experimental, opinionated, and ergonomic middleware for building high-performance text-based user interfaces (TUIs) in Rust. It offers a clean rendering pipeline built around composable primitives, predictable layout behavior, and ANSI-compatible styling.
ยงโจ Highlights
- Composable rendering engine via the
Renderabletrait. - Structured ANSI styling with type-safe escape sequences.
- Protected pixels to prevent important UI elements from being pruned.
- Flexible layout placement, including alignment presets and coordinate offsets.
- Modern design patterns inspired by SwiftUI, TUI toolkits, and declarative UI systems.
ยง๐ฆ Modules
engineโ The core rendering engine (OvertureRenderEngine).interfacesโ Traits, data structures, and abstraction interfaces.iooptsโ ANSI terminal options: styling, cursor control, etc.primitivesโ UI shapes, boxes, and composition-ready widgets.preludeโ Common types and traits for quick use.
ยง๐ Example
use overture::prelude::*;
let cols = 100; let rows = 20;
let mut engine = OvertureRenderEngine::new(cols, rows - 2);
let screen_dim = DiscreteCoord::new(cols, rows);
let banner = primitives::text::Text::new("Welcome To", DiscreteCoord::ORIGIN)
.rasterize()
.prune()
.align(RenderPlacementConfig::CenterStage, screen_dim)
.translate(Translation::new(0, -5))
.style(style![ANSISequence::FgMagenta, ANSISequence::Bold]);
let brand = primitives::text::Text::new("Overture", DiscreteCoord::ORIGIN)
.ascii_art_by_name("larry3d")
.rasterize()
.prune()
.align(RenderPlacementConfig::CenterStage, screen_dim)
.translate(Translation::new(0, 2))
.style(style![ANSISequence::FgMagenta, ANSISequence::Bold]);
let box_frame = primitives::shape::SoftBox::new(
DiscreteCoord::new(0, 0),
DiscreteCoord::new(cols - 1, rows - 1)
);
engine.load_renderable(banner, None);
engine.load_renderable(brand, None);
engine.load_renderable(box_frame, None);
engine.render(rows as u16);This example creates a centered styled text banner and surrounds it with a soft box frame. Each UI element is built using method chaining, enabling fluent configuration.
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ โ
โ โ
โ Welcome To โ
โ โ
โ โ
โ _____ __ โ
โ /\ __`\ /\ \__ โ
โ \ \ \/\ \ __ __ __ _ __ \ \ ,_\ __ __ _ __ __ โ
โ \ \ \ \ \ /\ \/\ \ /'__`\ /\`'__\ \ \ \/ /\ \/\ \ /\`'__\ /'__`\ โ
โ \ \ \_\ \ \ \ \_/ |/\ __/ \ \ \/ \ \ \_ \ \ \_\ \\ \ \/ /\ __/ โ
โ \ \_____\ \ \___/ \ \____\ \ \_\ \ \__\ \ \____/ \ \_\ \ \____\ โ
โ \/_____/ \/__/ \/____/ \/_/ \/__/ \/___/ \/_/ \/____/ โ
โ โ
โ โ
โ โ
โ โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏFor a full demo, see
demo::test().
ยงโ ๏ธ Status
Overture is currently under active development. APIs may change rapidly. Not production-ready, but already expressive for hobby or experimental TUI rendering.
ยงยฉ License
Makabaka1880, 2025. All rights reserved.
Modulesยง
- engine
- Overture Render Engine
- interfaces
- The
interfacesmodule defines core building blocks for rendering. - ioopts
- IO Options Module
- prelude
- Commonly used traits and types for Overture.
Users can
use overture::prelude::*to bring these into scope. - primitives
- The
primitivesmodule provides fundamental building blocks for the Overture project.
Macrosยง
- renderable_
list - Constructs a
RenderableListusing a list of renderable expressions. - some
- A convenience macro for
Some(expr). - style
- Constructs a
RenderStyleby chaining style elements.