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.
I\’m still learning Rust, so feedback and corrections are very welcome!
- Open the main file in VSCode.
- Click the
▶ Run
button above thefn main()
function. - Alternatively, run the following commands in the terminal:
# Default
cargo run
# or
cargo run -- --timeout 30 --level 20 --sound
To build and install the application in your ~/.cargo/bin/
directory:
cargo check
cargo build --release
cargo install --path .
R-Typing: A terminal-based typing practice app.
Usage: rtyping [OPTIONS]
Options:
-t, --timeout <TIMEOUT> Seconds [default: 60]
-l, --level <LEVEL> Number of words [default: 9]
--freq <FREQUENCY> Frequency📶 e.g, 800.0 or 480.0
-s, --sound Turn BGM🔊
-h, --help Print help
- Timeout functionality during user input.
- Accept user input.
- Display words on the screen.
- Use Rust's basic random functions.
- Add decorative strings to enhance visuals.
- Display a countdown timer in the top-left corner.
- Resolve Backspace handling issues in raw mode.
- Avoid bugs with
termion::clear::All
by using alternative methods. - Calculate WPM (Words Per Minute).
- Add background music (BGM).
- Include sound effects for typing.
- Handle external asset files during build.
- Restore terminal state after exiting raw mode.
- Add command-line options for customization.
- Validate command-line arguments.
- Change cursor style when user input.
For Apple silicon
rustup target add aarch64-apple-darwin
cargo build --release --target=aarch64-apple-darwin
For Windows (x86_64)
rustup target add x86_64-pc-windows-gnu
cargo build --release --target=x86_64-pc-windows-gnu