R-Typing is a terminal-based typing practice application created as a learning project for Rust. The app is designed with simplicity in mind, focusing on essential features for a fun and educational experience. It features a modern TUI, real-time WPM calculation, and procedurally generated sentences.
- Ensure you have the Rust toolchain installed.
- Clone the repository and navigate to the project directory.
- Run the following commands in the terminal:
# Default run
cargo run
# Run with custom options
cargo run -- --timeout 30 --level 20 --soundTo build and install the application in your ~/.cargo/bin/ directory:
cargo build --release
cargo install --path .R-Typing: A terminal-based typing app.
Usage: rtyping [OPTIONS]
Options:
-t, --timeout <TIMEOUT> Timer duration in seconds [default: 60]
-l, --level <LEVEL> Number of words to generate [default: 30]
--freq <FREQUENCY> Feedback sound frequency in Hz [default: 80.0]
-s, --sound Enable background music (BGM)
-h, --help Print help
- TUI (Text User Interface): Rich terminal interface built with
ratatuiandcrossterm. - Procedural Sentence Generation: Uses a 4-gram Markov Chain to generate natural-feeling English sentences from a sample text.
- Real-time Feedback:
- Visual indicators for correct (green) and incorrect (red background) characters.
- Real-time WPM (Words Per Minute) calculation.
- Interactive countdown timer with color-coded urgency.
- Audio Experience:
- Optional background music (BGM) playback using
rodio. - Auditory feedback (sine wave beep) on correct keypresses.
- Optional background music (BGM) playback using
- Customizable Experience: Command-line arguments to adjust time limits, sentence length, and sound settings.
- Responsive Controls: Supports standard typing controls including Backspace and Esc to finish early.
For Apple silicon (macOS):
rustup target add aarch64-apple-darwin
cargo build --release --target=aarch64-apple-darwinFor Windows (x86_64):
rustup target add x86_64-pc-windows-gnu
cargo build --release --target=x86_64-pc-windows-gnu


