PistonDevelopers / piston

A modular game engine written in Rust
https://www.piston.rs
MIT License
4.62k stars 234 forks source link

Cargo build of example project fails #1335

Closed mcsantiago closed 4 years ago

mcsantiago commented 4 years ago

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

mcsantiago commented 4 years ago

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