Skip to content
A modular game engine written in Rust
Rust Shell
Branch: master
Clone or download

Latest commit

Latest commit 18cc882 May 31, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
ci enhancing CI through travis Nov 18, 2016
images New logo Mar 6, 2016
src Published 0.50.0 May 31, 2020
.gitignore Ignore Cargo.lock Aug 3, 2014
.travis.yml Use for documentation Aug 19, 2017 Update according to new policy Jan 14, 2019
Cargo.png Publish 0.44 Jun 1, 2019
Cargo.toml Published 0.50.0 May 31, 2020 Updated GUIDE and added link from README Aug 19, 2017
LICENSE Initial commit May 19, 2014 Remove notice about Rust nightly Sep 28, 2019


Build Status

A modular game engine written in Rust

Maintainers of Piston core libraries: @bvssvni

Dive into the world of Piston

Start new project with Piston

You should know how to build "hello world" with Rust, see

Drawing a red rectangle

Add piston_window to your Cargo.toml, for example:

piston_window = "0.98.0"

In "src/", type the following code:

extern crate piston_window;

use piston_window::*;

fn main() {
    let mut window: PistonWindow =
        WindowSettings::new("Hello Piston!", [640, 480])
    while let Some(event) = {
        window.draw_2d(&event, |context, graphics, _device| {
            clear([1.0; 4], graphics);
            rectangle([1.0, 0.0, 0.0, 1.0], // red
                      [0.0, 0.0, 100.0, 100.0],

Use cargo run to start the application. It should clear the screen in white color and draw a red rectangle.



The Piston project is a large collaboration among many developers. There are libraries for 2D, 3D, event programming, AI, image processing etc. By sharing the maintenance, we get more time to build new stuff.

Piston is as much a community project as it is a collection of libraries. Writing and maintaining code is expensive, and by sharing this cost we reach our goals faster. We believe that seeking personal goals and ambitions, while helping each other, results in higher quality.

  • Our main goal is to free up time for maintainers and the people involved
  • ... such that we can create new amazing stuff and reach our personal goals
  • ... by making more people use Rust for game development and become engaged in open source

In addition we do research or plan to in the following areas:

Dependency graph


You can’t perform that action at this time.