Skip to main content

teksilo_terminal/
lib.rs

1// SPDX-License-Identifier: MPL-2.0
2// SPDX-FileCopyrightText: 2026 FernTech
3
4//! `teksilo-terminal` — an embeddable, fully-accessible terminal-emulator
5//! (Console) widget for Teksilo.
6//!
7//! Teksilo owns the **view** (grid rendering, input encoding, selection,
8//! `Role::Terminal` accessibility, theming, lifecycle); the actual VT emulation
9//! and the pseudo-terminal are delegated to proven crates behind the
10//! [`engine::TerminalEngine`] trait. The default backend
11//! ([`alacritty_engine`], enabled by the `alacritty` feature) pairs
12//! `portable-pty` (the PTY) with `alacritty_terminal` (the VT model) — nothing
13//! in this crate re-implements escape-code handling.
14//!
15//! Sits at the `teksilo-widgets` tier but depends only on `teksilo-core` /
16//! `teksilo-tokens` / `teksilo-canvas` / `teksilo-platform`, so apps that don't
17//! embed a terminal pay nothing.
18
19mod a11y;
20pub mod color_scheme;
21pub mod engine;
22mod input;
23pub mod memory;
24mod menu;
25mod mouse;
26mod reader;
27mod render;
28mod state;
29pub mod style;
30mod terminal;
31mod touch;
32
33#[cfg(feature = "alacritty")]
34mod pty;
35
36#[cfg(feature = "alacritty")]
37pub mod alacritty_engine;
38
39pub use color_scheme::{ColorScheme, TermColor};
40pub use engine::{
41    Cell, CellAttrs, CursorInfo, GridSnapshot, PtyGeom, Scroll, SelectionKind, SelectionSpan,
42    SpawnedEngine, TermCursorShape, TermEvent, TermMode, TerminalCommand, TerminalEngine,
43    TerminalEngineFactory, TerminalExit,
44};
45pub use memory::{MemoryEngine, MemoryEngineFactory, MemoryOutput, MemoryShared};
46pub use menu::TerminalMenuCommand;
47pub use mouse::TouchReporting;
48pub use render::CellMetrics;
49pub use style::{RecipeTerminalStyle, TerminalChrome, TerminalStyle};
50pub use terminal::{BellStyle, CursorStyle, Terminal, TerminalClosePolicy, TerminalController};
51
52#[cfg(feature = "alacritty")]
53pub use alacritty_engine::AlacrittyEngineFactory;