rsnake is a rendition of the classic snake game, built using the Rust programming language and the piston_window window wrapper. This project serves as both a fun game and an example of using Rust for game development.

rsnake gameplay rsnake gameplay

Building Locally

To run the game:

cargo run

To build a release binary and execute it:

cargo build --release


  • W/A/S/D or Up/Left/Down/Right: Control snake direction.
  • R: Restart the game (not functional yet).
  • ESC: Quit the game.

Known Flaws / ToDo List

  • R key has no effect yet.
  • Implement an end screen with restart and quit buttons.
  • Prevent the fruit and snake from spawning at the same coordinates or inside the snake's tail.

Explore rsnake to enjoy a classic game experience while seeing Rust's capabilities in game development. Contributions and suggestions for improvements are welcome!

Similar Projects


  1. Home
  2. Learn Rust
  3. Get Started
  4. Practice Rust
  5. Challenges
  6. Tutorials
  7. Blog
  8. Open source
  9. Learn Gleam


  1. GitHub
  2. X


  1. Privacy Policy
  2. Terms of Service