High-performance, ultra-optimized Matrix digital rain effect written in Rust
⚡ low-level • 🦀 rust • 🖥 terminal graphics • 🌙 minimal
LATT is a lightweight and ultra-fast Matrix digital rain implementation focused on maximum performance and minimal terminal overhead.
Written entirely in Rust with a strong emphasis on efficiency, clean rendering, and low resource consumption.
- ⚡ Near-zero CPU usage on idle terminals
- 🧠 Smart diff-based rendering
- 🧼 Clean ANSI escape sequence generation
- 🖤 Minimalist aesthetics
- 🧩 Lightweight architecture
- 🐧 Linux-first development
Unlike traditional implementations, latt uses a double-buffered renderer combined with cell-diff updates, ensuring that only modified terminal cells are written each frame. This significantly reduces terminal I/O and improves responsiveness.
git clone https://github.com/azytar/latt.git
cd lattcargo build --release./target/release/latt- 🦀 Pure Rust — Lightweight codebase focused on performance.
- 📺 Double Buffering — Prevents flickering and unnecessary redraws.
- 🎯 Diff Rendering — Updates only changed cells.
- 🎲 Fast Random Generation — Uses
SmallRngfor efficient randomness. - 🎌 Matrix Character Set — Classic Katakana-inspired symbols.
- 🎨 Dynamic Brightness Levels — Smooth fading effects.
- 🔌 Low Resource Usage — Optimized release profile with LTO and stripped binaries.
- ⌨️ Terminal Native — No GPU requirements.
LATT avoids common terminal-rendering bottlenecks through several low-level optimizations.
- Double-buffered frame storage
- Diff-based terminal updates
- Buffered output using
BufWriter - Reduced ANSI escape generation
- Efficient frame timing
- Graceful signal handling (
Ctrl+C) - Atomic shutdown synchronization
- Minimal heap allocations during rendering
[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = trueAdditional performance-critical paths use carefully audited unsafe code where bounds checks would otherwise become a bottleneck.
latt/
├── src/
│ └── main.rs
├── Cargo.toml
├── Cargo.lock
├── LICENSE
├── README.md
└── assets/
└── latt.png
LATT follows a simple principle:
Write less.
Draw less.
Allocate less.
Move fewer bytes.
Terminal rendering performance is often limited by I/O rather than computation. LATT focuses on reducing terminal writes as aggressively as possible.
simple tools
fast binaries
low overhead
clean terminals
MIT License
See the LICENSE file for details.
made with ☕ and Rust
