From b28d2850a7b8083e2a8780ed7778e38f485a68f5 Mon Sep 17 00:00:00 2001
From: Ashley Williams <ashley666ashley@gmail.com>
Date: Sun, 23 Sep 2018 19:59:17 -0400
Subject: [PATCH 1/8] feat(build): add rustc check

---
 src/build.rs         | 47 ++++++++++++++++++++++++++++++++++++++++++++
 src/command/build.rs | 10 ++++++++++
 src/error.rs         | 31 +++++++++++++++++++++++++++++
 3 files changed, 88 insertions(+)

diff --git a/src/build.rs b/src/build.rs
index ed7a93d..a0d2729 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -3,10 +3,57 @@
 use emoji;
 use error::Error;
 use progressbar::Step;
+use std::env;
 use std::path::Path;
 use std::process::Command;
+use std::str;
 use PBAR;
 
+/// Ensure that `rustc` is present and that it is >= 1.30.0
+pub fn check_rustc_version(step: &Step) -> Result<String, Error> {
+    let msg = format!("{}Checking `rustc` version...", emoji::TARGET);
+    PBAR.step(step, &msg);
+    let local_minor_version = rustc_minor_version();
+    match local_minor_version {
+        Some(mv) => {
+            if mv < 30 {
+              return Err(Error::RustcVersion {
+                message: format!(
+                  "Your version of Rust, '{}', is not supported.",
+                  mv.to_string()
+                ),
+                local_minor_version: mv.to_string(),
+              })
+            } else {
+              Ok(mv.to_string())
+            }
+      },
+      None => Err(Error::RustcMissing {
+        message: "We can't figure out what your Rust version is- which means you might not have Rust ins    talled. Please install Rust version 1.30.0 or higher.".to_string(),
+      }),
+    }
+}
+
+// from https://github.com/alexcrichton/proc-macro2/blob/79e40a113b51836f33214c6d00228934b41bd4ad/build.rs#L44-L61
+fn rustc_minor_version() -> Option<u32> {
+    macro_rules! otry {
+        ($e:expr) => {
+            match $e {
+                Some(e) => e,
+                None => return None,
+            }
+        };
+    }
+    let rustc = otry!(env::var_os("RUSTC"));
+    let output = otry!(Command::new(rustc).arg("--version").output().ok());
+    let version = otry!(str::from_utf8(&output.stdout).ok());
+    let mut pieces = version.split('.');
+    if pieces.next() != Some("rustc 1") {
+        return None;
+    }
+    otry!(pieces.next()).parse().ok()
+}
+
 /// Ensure that `rustup` has the `wasm32-unknown-unknown` target installed for
 /// the `nightly` toolchain.
 pub fn rustup_add_wasm_target(step: &Step) -> Result<(), Error> {
diff --git a/src/command/build.rs b/src/command/build.rs
index 8a6016d..f46d211 100644
--- a/src/command/build.rs
+++ b/src/command/build.rs
@@ -156,6 +156,7 @@ impl Build {
         }
         match &mode {
             BuildMode::Normal => steps![
+                step_check_rustc_version,
                 step_check_crate_config,
                 step_add_wasm_target,
                 step_build_wasm,
@@ -166,6 +167,7 @@ impl Build {
                 step_run_wasm_bindgen,
             ],
             BuildMode::Noinstall => steps![
+                step_check_rustc_version,
                 step_check_crate_config,
                 step_build_wasm,
                 step_create_dir,
@@ -176,6 +178,14 @@ impl Build {
         }
     }
 
+    fn step_check_rustc_version(&mut self, step: &Step, log: &Logger) -> Result<(), Error> {
+        info!(&log, "Checking rustc version...");
+        let version = build::check_rustc_version(step)?;
+        let msg = format!("rustc version is {}.", version);
+        info!(&log, "{}", &msg);
+        Ok(())
+    }
+
     fn step_check_crate_config(&mut self, step: &Step, log: &Logger) -> Result<(), Error> {
         info!(&log, "Checking crate configuration...");
         manifest::check_crate_config(&self.crate_path, step)?;
diff --git a/src/error.rs b/src/error.rs
index 3646398..c5c20e7 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -29,6 +29,22 @@ pub enum Error {
     /// An error handling zip archives.
     Zip(#[cause] zip::result::ZipError),
 
+    #[fail(display = "{}", _0)]
+    /// An error in parsing your rustc version.
+    RustcMissing {
+        /// Error message
+        message: String,
+    },
+
+    #[fail(display = "{}", _0)]
+    /// An error from having an unsupported rustc version.
+    RustcVersion {
+        /// Error message
+        message: String,
+        /// The minor version of the local rust
+        local_minor_version: String,
+    },
+
     /// An error invoking another CLI tool.
     #[fail(display = "{}. stderr:\n\n{}", message, stderr)]
     Cli {
@@ -112,6 +128,14 @@ impl Error {
         }
     }
 
+    /// Construct a rustc version error.
+    pub fn rustc_version_error(message: &str, local_version: &str) -> Self {
+        Error::RustcVersion {
+            message: message.to_string(),
+            local_minor_version: local_version.to_string(),
+        }
+    }
+
     /// Get a string description of this error's type.
     pub fn error_type(&self) -> String {
         match self {
@@ -119,6 +143,13 @@ impl Error {
             Error::SerdeJson(_) => "There was an JSON error. Details:\n\n",
             Error::SerdeToml(_) => "There was an TOML error. Details:\n\n",
             Error::Zip(_) => "There was an error handling zip files. Details:\n\n",
+            Error::RustcMissing {
+              message: _,
+            } =>  "We can't figure out what your Rust version is- which means you might not have Rust installed. Please install Rust version 1.30.0 or higher.",
+            Error::RustcVersion {
+              message: _,
+              local_minor_version: _,
+            } => "Your rustc version is not supported. Please install version 1.30.0 or higher.",
             Error::Cli {
                 message: _,
                 stderr: _,

From c0acb99e58a29e03b32e00901bac2a845d4882ed Mon Sep 17 00:00:00 2001
From: Ashley Williams <ashley666ashley@gmail.com>
Date: Mon, 24 Sep 2018 15:02:35 -0400
Subject: [PATCH 2/8] feat(build): remove all mention of nightly

---
 src/build.rs | 38 +++++---------------------------------
 1 file changed, 5 insertions(+), 33 deletions(-)

diff --git a/src/build.rs b/src/build.rs
index a0d2729..c50b622 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -55,17 +55,14 @@ fn rustc_minor_version() -> Option<u32> {
 }
 
 /// Ensure that `rustup` has the `wasm32-unknown-unknown` target installed for
-/// the `nightly` toolchain.
+/// current toolchain
 pub fn rustup_add_wasm_target(step: &Step) -> Result<(), Error> {
     let msg = format!("{}Adding WASM target...", emoji::TARGET);
     PBAR.step(step, &msg);
-    ensure_nightly()?;
     let output = Command::new("rustup")
         .arg("target")
         .arg("add")
         .arg("wasm32-unknown-unknown")
-        .arg("--toolchain")
-        .arg("nightly")
         .output()?;
     if !output.status.success() {
         let s = String::from_utf8_lossy(&output.stderr);
@@ -75,34 +72,13 @@ pub fn rustup_add_wasm_target(step: &Step) -> Result<(), Error> {
     }
 }
 
-/// Ensure that the `nightly` toolchain is installed in `rustup`.
-fn ensure_nightly() -> Result<(), Error> {
-    let nightly_check = Command::new("rustc").arg("+nightly").arg("-V").output()?;
-    if !nightly_check.status.success() {
-        let res = Command::new("rustup")
-            .arg("toolchain")
-            .arg("install")
-            .arg("nightly")
-            .output()?;
-        if !res.status.success() {
-            let s = String::from_utf8_lossy(&res.stderr);
-            return Error::cli("Adding the nightly toolchain failed", s);
-        }
-    }
-    Ok(())
-}
-
-/// Run `cargo build` with the `nightly` toolchain and targetting
-/// `wasm32-unknown-unknown`.
+/// Run `cargo build` targetting `wasm32-unknown-unknown`.
 pub fn cargo_build_wasm(path: &Path, debug: bool, step: &Step) -> Result<(), Error> {
     let msg = format!("{}Compiling to WASM...", emoji::CYCLONE);
     PBAR.step(step, &msg);
     let output = {
         let mut cmd = Command::new("cargo");
-        cmd.current_dir(path)
-            .arg("+nightly")
-            .arg("build")
-            .arg("--lib");
+        cmd.current_dir(path).arg("build").arg("--lib");
         if !debug {
             cmd.arg("--release");
         }
@@ -118,15 +94,11 @@ pub fn cargo_build_wasm(path: &Path, debug: bool, step: &Step) -> Result<(), Err
     }
 }
 
-/// Run `cargo build --tests` with the `nightly` toolchain and targetting
-/// `wasm32-unknown-unknown`.
+/// Run `cargo build --tests` targetting `wasm32-unknown-unknown`.
 pub fn cargo_build_wasm_tests(path: &Path, debug: bool) -> Result<(), Error> {
     let output = {
         let mut cmd = Command::new("cargo");
-        cmd.current_dir(path)
-            .arg("+nightly")
-            .arg("build")
-            .arg("--tests");
+        cmd.current_dir(path).arg("build").arg("--tests");
         if !debug {
             cmd.arg("--release");
         }

From 183704f153c5decfab9fc6cc700a67a8fd81f404 Mon Sep 17 00:00:00 2001
From: Ashley Williams <ashley666ashley@gmail.com>
Date: Mon, 24 Sep 2018 16:35:57 -0400
Subject: [PATCH 3/8] doc(rustc): add rustc version req to readme

---
 README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.md b/README.md
index a093e14..b145e06 100644
--- a/README.md
+++ b/README.md
@@ -24,6 +24,8 @@ visiting that repo!
 
 ## 🔮 Prerequisities
 
+This project requires Rust 1.30.0 or later.
+
 - [Development Environment](https://rustwasm.github.io/wasm-pack/book/prerequisites/index.html)
 - [Installation](https://rustwasm.github.io/wasm-pack/installer)
 - [Project Setup](https://rustwasm.github.io/wasm-pack/book/project-setup/index.html)

From f45322c76bcdd9c0f9c07de7325e621405b90a14 Mon Sep 17 00:00:00 2001
From: Ashley Williams <ashley666ashley@gmail.com>
Date: Mon, 24 Sep 2018 16:36:19 -0400
Subject: [PATCH 4/8] chore(deps): cargo update

---
 Cargo.lock | 74 +++++++++++++++++++++++++++---------------------------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 415be84..5a0c84b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -16,7 +16,7 @@ name = "ansi_term"
 version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -26,7 +26,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -38,7 +38,7 @@ dependencies = [
  "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -92,7 +92,7 @@ dependencies = [
  "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -137,7 +137,7 @@ dependencies = [
  "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -161,7 +161,7 @@ dependencies = [
  "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "termios 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -194,11 +194,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "libz-sys 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libz-sys 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "openssl-sys 0.9.36 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -311,7 +311,7 @@ dependencies = [
  "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -338,7 +338,7 @@ name = "lazy_static"
 version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -348,7 +348,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "libz-sys"
-version = "1.0.22"
+version = "1.0.23"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -373,7 +373,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -411,7 +411,7 @@ version = "0.1.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -499,7 +499,7 @@ dependencies = [
  "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -535,7 +535,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -547,7 +547,7 @@ dependencies = [
  "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -613,7 +613,7 @@ name = "remove_dir_all"
 version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -640,7 +640,7 @@ version = "0.1.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -674,12 +674,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "serde_json"
-version = "1.0.28"
+version = "1.0.30"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -730,7 +730,7 @@ dependencies = [
  "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -774,7 +774,7 @@ dependencies = [
 
 [[package]]
 name = "syn"
-version = "0.15.4"
+version = "0.15.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -800,7 +800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "tar"
-version = "0.4.16"
+version = "0.4.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -828,7 +828,7 @@ dependencies = [
  "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
  "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -837,7 +837,7 @@ version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -889,7 +889,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -949,7 +949,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "version_check"
-version = "0.1.4"
+version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -974,12 +974,12 @@ dependencies = [
  "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)",
  "slog 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "slog-term 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "structopt 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "tar 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tar 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "which 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1002,7 +1002,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "winapi"
-version = "0.3.5"
+version = "0.3.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1029,7 +1029,7 @@ name = "wincolor"
 version = "0.1.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -1092,7 +1092,7 @@ dependencies = [
 "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
 "checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7"
 "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
-"checksum libz-sys 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "65ff614643d7635dfa2151913d95c4ee90ee1fe15d9e0980f4dcb1a7e5837c18"
+"checksum libz-sys 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)" = "c7bdca442aa002a930e6eb2a71916cabe46d91ffec8df66db0abfb1bc83469ab"
 "checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
 "checksum memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b3629fe9fdbff6daa6c33b90f7c08355c1aca05a3d01fa8063b822fcf185f3b"
 "checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4"
@@ -1132,7 +1132,7 @@ dependencies = [
 "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
 "checksum serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "84257ccd054dc351472528c8587b4de2dbf0dc0fe2e634030c1a90bfdacebaa9"
 "checksum serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "31569d901045afbff7a9479f793177fe9259819aff10ab4f89ef69bbc5f567fe"
-"checksum serde_json 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "d30ec34ac923489285d24688c7a9c0898d16edff27fc1f1bd854edeff6ca3b7f"
+"checksum serde_json 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "7f60a296fed15c3edbbe9aa83b646531459e565c525b0ab628deb1a4b28e4180"
 "checksum slog 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "09e4f1d0276ac7d448d98db16f0dab0220c24d4842d88ce4dad4b306fa234f1d"
 "checksum slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e544d16c6b230d84c866662fe55e31aacfca6ae71e6fc49ae9a311cb379bfc2f"
 "checksum slog-term 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5951a808c40f419922ee014c15b6ae1cd34d963538b57d8a4778b9ca3fff1e0b"
@@ -1143,10 +1143,10 @@ dependencies = [
 "checksum structopt 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8e9ad6a11096cbecdcca0cc6aa403fdfdbaeda2fb3323a39c98e6a166a1e45a"
 "checksum structopt-derive 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4cbce8ccdc62166bd594c14396a3242bf94c337a51dbfa9be1076dd74b3db2af"
 "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741"
-"checksum syn 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9056ebe7f2d6a38bc63171816fd1d3430da5a43896de21676dc5c0a4b8274a11"
+"checksum syn 0.15.6 (registry+https://github.com/rust-lang/crates.io-index)" = "854b08a640fc8f54728fb95321e3ec485b365a97fe47609797c671addd1dde69"
 "checksum synstructure 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "85bb9b7550d063ea184027c9b8c20ac167cd36d3e06b3a40bceb9d746dc1a7b7"
 "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60"
-"checksum tar 0.4.16 (registry+https://github.com/rust-lang/crates.io-index)" = "e8f41ca4a5689f06998f0247fcb60da6c760f1950cc9df2a10d71575ad0b062a"
+"checksum tar 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)" = "83b0d14b53dbfd62681933fadd651e815f99e6084b649e049ab99296e05ab3de"
 "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
 "checksum tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "55c1195ef8513f3273d55ff59fe5da6940287a0d7a98331254397f464833675b"
 "checksum term 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5e6b677dd1e8214ea1ef4297f85dbcbed8e8cdddb561040cc998ca2551c37561"
@@ -1165,11 +1165,11 @@ dependencies = [
 "checksum uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e1436e58182935dcd9ce0add9ea0b558e8a87befe01c1a301e6020aeb0876363"
 "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d"
 "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
-"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051"
+"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
 "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
 "checksum which 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49c4f580e93079b70ac522e7bdebbe1568c8afa7d8d05ee534ee737ca37d2f51"
 "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
-"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd"
+"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
 "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
 "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
 "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

From 9d35377cd3f1c26880c566919cdf8b843da770de Mon Sep 17 00:00:00 2001
From: Ashley Williams <ashley666ashley@gmail.com>
Date: Mon, 24 Sep 2018 17:05:49 -0400
Subject: [PATCH 5/8] fix(build): fix and improve rustc check err msgs

---
 src/build.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/build.rs b/src/build.rs
index c50b622..a4e3e4e 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -19,7 +19,7 @@ pub fn check_rustc_version(step: &Step) -> Result<String, Error> {
             if mv < 30 {
               return Err(Error::RustcVersion {
                 message: format!(
-                  "Your version of Rust, '{}', is not supported.",
+                  "Your version of Rust, '{}', is not supported. Please install Rust version 1.30.0 or higher.",
                   mv.to_string()
                 ),
                 local_minor_version: mv.to_string(),
@@ -29,7 +29,7 @@ pub fn check_rustc_version(step: &Step) -> Result<String, Error> {
             }
       },
       None => Err(Error::RustcMissing {
-        message: "We can't figure out what your Rust version is- which means you might not have Rust ins    talled. Please install Rust version 1.30.0 or higher.".to_string(),
+        message: "We can't figure out what your Rust version is- which means you might not have Rust installed. Please install Rust version 1.30.0 or higher.".to_string(),
       }),
     }
 }

From 631037197fb1f0d518ccde516dbeaffe0db99d0f Mon Sep 17 00:00:00 2001
From: Ashley Williams <ashley666ashley@gmail.com>
Date: Mon, 24 Sep 2018 17:47:18 -0400
Subject: [PATCH 6/8] fix(build): rustc check emoji and fix

---
 src/build.rs | 4 ++--
 src/emoji.rs | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/build.rs b/src/build.rs
index a4e3e4e..ac3075f 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -11,7 +11,7 @@ use PBAR;
 
 /// Ensure that `rustc` is present and that it is >= 1.30.0
 pub fn check_rustc_version(step: &Step) -> Result<String, Error> {
-    let msg = format!("{}Checking `rustc` version...", emoji::TARGET);
+    let msg = format!("{}Checking `rustc` version...", emoji::CRAB);
     PBAR.step(step, &msg);
     let local_minor_version = rustc_minor_version();
     match local_minor_version {
@@ -44,7 +44,7 @@ fn rustc_minor_version() -> Option<u32> {
             }
         };
     }
-    let rustc = otry!(env::var_os("RUSTC"));
+    let rustc = otry!(env::var_os("RUSTC").unwrap_or(|| "rustc".into())); // updated because we are not in a build script
     let output = otry!(Command::new(rustc).arg("--version").output().ok());
     let version = otry!(str::from_utf8(&output.stdout).ok());
     let mut pieces = version.split('.');
diff --git a/src/emoji.rs b/src/emoji.rs
index 8a7bc8d..597c8cd 100644
--- a/src/emoji.rs
+++ b/src/emoji.rs
@@ -26,3 +26,4 @@ pub static DANCERS: Emoji = Emoji("đŸ‘¯  ", "");
 pub static ERROR: Emoji = Emoji("⛔  ", "");
 pub static INFO: Emoji = Emoji("â„šī¸  ", "");
 pub static WRENCH: Emoji = Emoji("🔧  ", "");
+pub static CRAB: Emoji = Emoji("đŸĻ€  ", "");

From edd73082214f88d1066cbff93e508036152afae0 Mon Sep 17 00:00:00 2001
From: Ashley Williams <ashley666ashley@gmail.com>
Date: Mon, 24 Sep 2018 17:59:25 -0400
Subject: [PATCH 7/8] fix(build): rustc check works now

---
 src/build.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/build.rs b/src/build.rs
index ac3075f..55a38e1 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -3,7 +3,6 @@
 use emoji;
 use error::Error;
 use progressbar::Step;
-use std::env;
 use std::path::Path;
 use std::process::Command;
 use std::str;
@@ -44,8 +43,7 @@ fn rustc_minor_version() -> Option<u32> {
             }
         };
     }
-    let rustc = otry!(env::var_os("RUSTC").unwrap_or(|| "rustc".into())); // updated because we are not in a build script
-    let output = otry!(Command::new(rustc).arg("--version").output().ok());
+    let output = otry!(Command::new("rustc").arg("--version").output().ok());
     let version = otry!(str::from_utf8(&output.stdout).ok());
     let mut pieces = version.split('.');
     if pieces.next() != Some("rustc 1") {

From 0c696e2289b9ce90e6da1ddf60e3ab6b39e0ca71 Mon Sep 17 00:00:00 2001
From: Ashley Williams <ashley666ashley@gmail.com>
Date: Mon, 24 Sep 2018 18:06:51 -0400
Subject: [PATCH 8/8] fix(build): make rustc error msg a little better

---
 src/build.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/build.rs b/src/build.rs
index 55a38e1..aeee410 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -18,7 +18,7 @@ pub fn check_rustc_version(step: &Step) -> Result<String, Error> {
             if mv < 30 {
               return Err(Error::RustcVersion {
                 message: format!(
-                  "Your version of Rust, '{}', is not supported. Please install Rust version 1.30.0 or higher.",
+                  "Your version of Rust, '1.{}', is not supported. Please install Rust version 1.30.0 or higher.",
                   mv.to_string()
                 ),
                 local_minor_version: mv.to_string(),