Expand description
A TEA application framework for full-screen Urushi interfaces.
An application is a value: Application describes a program, its Model
is the state the runtime owns, and its update returns an Effect rather
than performing one. Everything the program wants to hear from — terminal
input included — it declares as a Subscription. Building those values
reads no terminal and starts no work; the runtime’s executor machinery
interprets them behind boundaries that do not appear in application types.
The framework resolves each application urushi::View and presents it
through urushi_tui::Screen. Cell storage, diffing, and transactional
frame commit stay in urushi-tui; this crate owns application state,
delivery ordering, effects, subscriptions, drawing policy, terminal input,
and session restoration.
§Cargo features
crosstermis enabled by default and providesrunandRuntime::run. Cell-only builds and platforms without the native Unix connection use its portable backend; graphics-enabled Unix builds use the native bidirectional backend so protocol support can be queried. With default features disabled, supply a backend throughRuntime::backend.graphicsintegrates Kitty or Sixel presentation and re-exportsGraphicsPreferencefor runtime selection. The runtime retains Kitty uploads and caches encoded Sixel bands while redrawing each complete Sixel scene. Applications construct image views with a directurushi-graphicsdependency.
Structs§
- Admission
- What a source does with an item the runtime has not accepted yet.
- Cell
Pixels - Effect
- Work the runtime performs on behalf of an
update, whose result returns as a message. - KeyEvent
- One normalized key event.
- KeyEvent
State - Additional state reported with an enhanced keyboard event.
- Modifiers
- The keyboard modifiers held for one input event.
- Mouse
Event - One normalized mouse event at a zero-based cell position.
- Runtime
- A blocking full-screen application runtime.
- Send
Error - The runtime is no longer taking this source’s messages.
- Sender
- Where an application-defined source puts its messages.
- Subscription
- The sources an application wants to hear from, for as long as it keeps declaring them.
- Surface
- What an application can observe about the surface it draws on.
- Surface
Size - The visible dimensions of a terminal in character cells.
- Tokio
Clock - The system monotonic clock driven by Tokio timers.
- Tokio
Executor - Tokio’s task runner, kept behind Urushi’s executor vocabulary.
Enums§
- Error
- A failure to construct or drive a terminal application.
- Focus
Change - Input
- Terminal input as it reaches an application.
- KeyCode
- A backend-independent terminal key.
- KeyKind
- The transition represented by a key event.
- Media
KeyCode - Modifier
KeyCode - Mouse
Button - Mouse
Kind - A normalized mouse action.
- Signal
- A process signal an application can subscribe to.
Traits§
- Application
- A full-screen terminal application, as a value that describes a program rather than the program’s running state.
- Clock
- The source of time shared by delayed effects and interval subscriptions.
- Execution
- A running task whose drop cancels work that has not completed yet.
- Executor
- Where runtime work runs, expressed without an executor’s task type.
Functions§
- run
- Runs an application with the production defaults.
Type Aliases§
- Blocking
Task - Blocking work accepted by a runtime executor.
- Task
- Asynchronous work accepted by a runtime executor.