First Rust project!
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
Guess the Number (Rust)
Simple number guessing game. Enter a number, and the program tells you if it’s smaller or larger than the target.
Building
Make sure Rust and Cargo are installed.
# Run directly
cargo run
# Build release binary
cargo build --release
Binary location:
-
Linux / macOS:
target/release/guess_the_number -
Windows:
target\release\guess_the_number.exe
Run the binary to play:
./target/release/guess_the_number # Linux/macOS
target\release\guess_the_number.exe # Windows