Skip to content

azytar/latt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LATT

High-performance, ultra-optimized Matrix digital rain effect written in Rust

⚡ low-level • 🦀 rust • 🖥 terminal graphics • 🌙 minimal


✨ About

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.

Design Goals

  • ⚡ 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.


📸 Preview

LATT Preview


🚀 Installation

Clone the repository

git clone https://github.com/azytar/latt.git
cd latt

Build

cargo build --release

Run

./target/release/latt

🛠 Features

  • 🦀 Pure Rust — Lightweight codebase focused on performance.
  • 📺 Double Buffering — Prevents flickering and unnecessary redraws.
  • 🎯 Diff Rendering — Updates only changed cells.
  • 🎲 Fast Random Generation — Uses SmallRng for 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.

🔬 Technical Details

LATT avoids common terminal-rendering bottlenecks through several low-level optimizations.

Rendering

  • Double-buffered frame storage
  • Diff-based terminal updates
  • Buffered output using BufWriter
  • Reduced ANSI escape generation

Runtime

  • Efficient frame timing
  • Graceful signal handling (Ctrl+C)
  • Atomic shutdown synchronization
  • Minimal heap allocations during rendering

Build Optimizations

[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true

Additional performance-critical paths use carefully audited unsafe code where bounds checks would otherwise become a bottleneck.


📂 Project Structure

latt/
├── src/
│   └── main.rs
├── Cargo.toml
├── Cargo.lock
├── LICENSE
├── README.md
└── assets/
    └── latt.png

📈 Performance Philosophy

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.


🌌 Philosophy

simple tools
fast binaries
low overhead
clean terminals


📜 License

MIT License

See the LICENSE file for details.


made with ☕ and Rust

About

Matrix-style digital rain renderer for the terminal, written in rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages