A terminal-based typing speed test application built with Rust that helps you improve your typing speed and accuracy.
- 60-second timed typing test with real-time progress tracking
- Colorful terminal UI with visual feedback
- Immediate word-by-word feedback - correct words in green, errors in red
- Detailed statistics including:
- Total words typed
- Correct words count
- Error count
- Accuracy percentage
- Raw WPM (Words Per Minute)
- Adjusted WPM (accounting for accuracy)
- Net WPM (corrected for errors)
- Random sentence selection from a large pool of Rust-themed sentences
- Professional results table with formatted metrics
- Rust 1.70 or higher
- Cargo (comes with Rust)
- Clone or download this project
- Ensure
output.txtis in the same directory as your source code - Install dependencies:
cargo build --releaseRun the application:
cargo run --release- The program will display a random sentence from
output.txt - Type the sentence exactly as shown and press Enter
- You'll receive immediate feedback showing correct (green) and incorrect (red) words
- Continue typing new sentences until the 60-second timer expires
- View your detailed typing statistics at the end
typing-test/
├── Cargo.toml # Project dependencies and metadata
├── src/
│ └── main.rs # Main application code
├── output.txt # Sentence database (required)
└── README.md # This file
- rand (0.9) - Random number generation for sentence selection
- colored (2.0) - Terminal text coloring
- prettytable-rs (0.10) - Formatted table output
- indicatif (0.17) - Progress bar visualization
- clearscreen (4.0.2) - Terminal screen clearing
- crossterm (0.27) - Cross-platform terminal manipulation
To modify the test duration, edit the time variable in main.rs:
let time = 60; // Change this value (in seconds)Add your own sentences to output.txt, with one sentence per line. The program will randomly select from all available sentences.
- Total Words: Number of words you typed during the test
- Correct Words: Number of words typed correctly
- Errors: Number of words typed incorrectly
- Accuracy: Percentage of correctly typed words
- Raw WPM: Total words typed per minute (uncorrected)
- Adjusted WPM: Raw WPM multiplied by accuracy
- Net WPM: (Total words - Errors) per minute
=== Typing Test ===
The quick brown fox jumps over the lazy dog while the sun sets behind...
Write the sentence here: The quick brown fox jumps over the lazy dog...
Feedback: The quick brown fox jumps over the lazy dog
=== Test Finished ===
45 total words!
42 of correct words!
+----------------+----------+
| Metric | Value |
+----------------+----------+
| Total Words | 45 |
| Correct Words | 42 |
| Errors | 3 |
| Accuracy | 93.33% |
| Raw WPM | 45.00 |
| Adjusted WPM | 42.00 |
| Net WPM | 42.00 |
+----------------+----------+
- Practice regularly - Consistency is key to improving typing speed
- Focus on accuracy first - Speed will naturally increase with accuracy
- Use proper finger placement - Follow touch typing guidelines
- Don't look at the keyboard - Train your muscle memory
- Take breaks - Avoid fatigue by practicing in short sessions
- The program expects
output.txtto exist in the same directory - Input is case-sensitive and whitespace-sensitive
- Progress bar updates only between sentences, not in real-time during typing
- Add difficulty levels (beginner, intermediate, advanced)
- Save typing history and track progress over time
- Add custom time duration selection
- Real-time WPM display during typing
- Multiplayer/competitive mode
- Support for different languages
This project is open source and available for educational purposes.
Feel free to fork this project and submit pull requests with improvements!
Built with love using Rust and various excellent crates from the Rust community.