#crossterm #tui #wasm

tinycrossterm

Minimal, feature-gated, WASM-compatible subset of crossterm

1 unstable release

0.1.0 Feb 28, 2026

#767 in Command-line interface


Used in 4 crates (2 directly)

MIT license

43KB
1K SLoC

tinycrossterm

Minimal, feature-gated, WASM-compatible subset of crossterm.

Drop-in replacement for the crossterm APIs that ratatui-based TUI apps typically need — event types, raw mode, terminal size, alternate screen — with first-class wasm32-wasip1 support and granular feature flags to keep binary size small.

Features

All features are enabled by default. Disable what you don't need:

Feature Provides
events KeyCode, KeyEvent, KeyModifiers, MouseEvent, event reading
terminal enable_raw_mode, disable_raw_mode, size, EnterAlternateScreen
execute execute! macro for writing command sequences
# Only event types, no I/O
tinycrossterm = { version = "0.1", default-features = false, features = ["events"] }

WASM

Compiles and runs on wasm32-wasip1. Designed to work with terminal emulators like libghostty that provide a real VT to WASM processes.

Dependencies

~42KB