๐ฆ rusty_repl
A lightweight, modular framework for building interactive REPLs in Rust โ with clean prompts, terminal isolation, and customizable input handling.
โจ Features
- ๐ฅ๏ธ Alternate screen mode โ clean, isolated terminal workspace
- ๐ฌ Custom prompts โ easily define your own
Promptstyle - โก Input handling loop โ powered by
reedline - ๐งน Automatic cleanup โ restores cursor, title, and screen on exit
- ๐จ Extensible design โ plug in custom keyword highlighters or prompt logic
๐ Quick Start
Add to your Cargo.toml:
[]
= "0.1.0"
Then in your project:
use Repl;
This opens an alternate terminal screen with a minimal prompt.
Type exit to leave the session.
๐งฉ Architecture
| Module | Responsibility |
|---|---|
repl::input |
Handles user input with reedline |
repl::output |
Manages terminal (alternate screen, cursor, cleanup) |
repl::prompt |
Defines a cleaner, customizable prompt |
repl::manager |
Connects all components into a cohesive REPL session |
Top-level entrypoint:
use Repl;
๐ง Future Enhancements
- ๐ Keyword highlighting with configurable colors
- ๐พ Persistent command history
- ๐ง Syntax-aware input completion
๐ License
Licensed under the MIT License