PistonDevelopers / piston

A modular game engine written in Rust

Home Page:https://www.piston.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cargo build of example project fails

mcsantiago opened this issue · comments

Steps to reproduce:

  1. Start a new project cargo new rusty_piston_project
  2. Add piston_window = "0.98.0" to the dependencies
  3. Copy/paste example code from README
extern crate piston_window;

use piston_window::*;

fn main() {
    let mut window: PistonWindow =
        WindowSettings::new("Hello Piston!", [640, 480])
        .exit_on_esc(true).build().unwrap();
    while let Some(event) = window.next() {
        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],
                      context.transform,
                      graphics);
        });
    }
}
  1. Running cargo build fails to install arrayvec v0.5.1

This is run on MacOS Mojave v10.14.5

Nevermind! I just had to update my version of Rust to the latest: rustup update