# tinycrossterm
Minimal, feature-gated, WASM-compatible subset of [crossterm](https://github.com/crossterm-rs/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:
| `events` | `KeyCode`, `KeyEvent`, `KeyModifiers`, `MouseEvent`, event reading |
| `terminal` | `enable_raw_mode`, `disable_raw_mode`, `size`, `EnterAlternateScreen` |
| `execute` | `execute!` macro for writing command sequences |
```toml
# 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](https://github.com/ghostty-org/ghostty) that provide a real VT to WASM processes.