From 743aaac4cddb7030dddb08ec7531bcd67e6da45e Mon Sep 17 00:00:00 2001 From: iceiix Date: Sat, 29 Sep 2018 13:39:20 -0700 Subject: [PATCH 01/45] Enable SDL hint to workaround SDL_SetRelativeMouseMode broken on Linux Fixes https://github.com/Thinkofname/steven/issues/73 See https://bugzilla.libsdl.org/show_bug.cgi?id=2150 --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 46345c13..1ae69ce6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -193,6 +193,7 @@ fn main() { .resizable() .build() .expect("Could not create sdl window."); + sdl2::hint::set_with_priority("SDL_MOUSE_RELATIVE_MODE_WARP", "1", sdl2::hint::Hint::Override); let gl_attr = sdl_video.gl_attr(); gl_attr.set_stencil_size(0); gl_attr.set_depth_size(24); From b399b74adb84af68278959c13d6f719358e395c3 Mon Sep 17 00:00:00 2001 From: iceiix Date: Sat, 29 Sep 2018 13:56:52 -0700 Subject: [PATCH 02/45] Update to rust-sdl2 0.31.0 --- Cargo.lock | 20 +++++++++++++------- Cargo.toml | 2 +- src/main.rs | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5a48fffa..a34dc951 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,7 +13,7 @@ dependencies = [ "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "sdl2 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "steven_blocks 0.0.1", @@ -62,6 +62,11 @@ dependencies = [ "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cfg-if" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cgmath" version = "0.7.0" @@ -493,7 +498,7 @@ dependencies = [ [[package]] name = "sdl2" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -501,15 +506,15 @@ dependencies = [ "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "sdl2-sys 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sdl2-sys" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -692,6 +697,7 @@ dependencies = [ "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum bzip2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c30a578393daf45ee6101aa043afa8d47a7e70f05032b15b88b28a7111c6a53" "checksum bzip2-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "81c91586be5d862524de53126d49c11fef83dc1a8e8034235f37372e3b2da311" +"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" "checksum cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75e93b3eb66e74ffb946a69ff54c6026c1399960241c843f249ea0127b96b9f6" "checksum collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)" = "" "checksum color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a475fc4af42d83d28adf72968d9bcfaf035a1a9381642d8e85d8a04957767b0d" @@ -744,8 +750,8 @@ dependencies = [ "checksum rayon 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e501871917624668fe601ad12a730450414f9b0b64722a898b040ce3ae1b0fa" "checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" "checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" -"checksum sdl2 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63066036ad426250ac56d23e38fd05063b38b661556acd596f4046cc92d98415" -"checksum sdl2-sys 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b48638b7882759f3421038fcd38ad5f1ea19b119d80c99f1601933004629e34d" +"checksum sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a74c2a98a354b20713b90cce70aef9e927e46110d1bc4ef728fd74e0d53eba60" +"checksum sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c543ce8a6e33a30cb909612eeeb22e693848211a84558d5a00bb11e791b7ab7" "checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" "checksum serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1b0e0732aa8ec4267f61815a396a942ba3525062e3bd5520aa8419927cfc0a92" "checksum serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b22e8a0554f31cb0f501e027de07b253553b308124f61c57598b9678dba35c0b" diff --git a/Cargo.toml b/Cargo.toml index 9bb309cf..7067df55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ authors = [ "Thinkofdeath " ] opt-level = 1 [dependencies] -sdl2 = "0.30.0" +sdl2 = "0.31.0" byteorder = "0.5.0" hyper = "0.8.0" serde = "0.7.0" diff --git a/src/main.rs b/src/main.rs index 1ae69ce6..2e166e93 100644 --- a/src/main.rs +++ b/src/main.rs @@ -193,7 +193,7 @@ fn main() { .resizable() .build() .expect("Could not create sdl window."); - sdl2::hint::set_with_priority("SDL_MOUSE_RELATIVE_MODE_WARP", "1", sdl2::hint::Hint::Override); + sdl2::hint::set_with_priority("SDL_MOUSE_RELATIVE_MODE_WARP", "1", &sdl2::hint::Hint::Override); let gl_attr = sdl_video.gl_attr(); gl_attr.set_stencil_size(0); gl_attr.set_depth_size(24); From fa8f7bb9b9ce25ee51d556f6ccdf65e013668062 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 17:31:16 -0700 Subject: [PATCH 03/45] Increase sample count to 2 to fix/workaround rendering issue #74 https://github.com/Thinkofname/steven/issues/74 --- src/render/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/mod.rs b/src/render/mod.rs index 9644d5d6..1eb9b5e7 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -42,7 +42,7 @@ use std::sync::mpsc; const ATLAS_SIZE: usize = 1024; // TEMP -const NUM_SAMPLES: i32 = 1; +const NUM_SAMPLES: i32 = 2; pub struct Camera { pub pos: cgmath::Point3, From 84cbc3d00ea8d3ac4ae4950877e39a8c51c9acf8 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 17:50:02 -0700 Subject: [PATCH 04/45] Fix illegal use of floating point in pattern, https://github.com/iceiix/steven/issues/1 https://github.com/rust-lang/rust/issues/41620 --- src/model/liquid.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model/liquid.rs b/src/model/liquid.rs index 6224d321..9e5c58ce 100644 --- a/src/model/liquid.rs +++ b/src/model/liquid.rs @@ -58,10 +58,10 @@ pub fn render_liquid(textures: Arc>,lav if vert.y == 0.0 { vert.y = y as f32; } else { - let height = match (vert.x, vert.z) { - (0.0, 0.0) => ((16.0 / 8.0) * (tl as f32)) as i32, - (_, 0.0) => ((16.0 / 8.0) * (tr as f32)) as i32, - (0.0, _) => ((16.0 / 8.0) * (bl as f32)) as i32, + let height = match (vert.x as i64, vert.z as i64) { + (0, 0) => ((16.0 / 8.0) * (tl as f32)) as i32, + (_, 0) => ((16.0 / 8.0) * (tr as f32)) as i32, + (0, _) => ((16.0 / 8.0) * (bl as f32)) as i32, (_, _) => ((16.0 / 8.0) * (br as f32)) as i32, }; vert.y = (height as f32)/16.0 + (y as f32); From d704edaf81e261fb5bd4fe1d19e303cd58ce6f24 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 17:53:01 -0700 Subject: [PATCH 05/45] Comment out dead code to avoid warning, for https://github.com/iceiix/steven/issues/1 --- src/entity/player.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity/player.rs b/src/entity/player.rs index 3c233018..6892c5dc 100644 --- a/src/entity/player.rs +++ b/src/entity/player.rs @@ -149,7 +149,7 @@ enum PlayerModelPart { ArmLeft = 4, ArmRight = 5, NameTag = 6, - Cape = 7, + //Cape = 7, // TODO } // TODO: Setup culling From fbd71ea8ce22a55ed263df9b3cd5377155bbf2d3 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 18:42:13 -0700 Subject: [PATCH 06/45] Fix warning: variable does not need to be mutable, in nightly-2017-08-31 https://github.com/iceiix/steven/issues/3 --- src/protocol/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 6bc14c8c..ba6da376 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -794,7 +794,7 @@ impl Conn { let uncompressed_size = buf.len(); let mut new = Vec::new(); try!(VarInt(uncompressed_size as i32).write_to(&mut new)); - let mut write = self.compression_write.as_mut().unwrap(); + let write = self.compression_write.as_mut().unwrap(); write.reset(io::Cursor::new(buf)); try!(write.read_to_end(&mut new)); buf = new; @@ -824,7 +824,7 @@ impl Conn { if uncompressed_size != 0 { let mut new = Vec::with_capacity(uncompressed_size as usize); { - let mut reader = self.compression_read.as_mut().unwrap(); + let reader = self.compression_read.as_mut().unwrap(); reader.reset(buf); try!(reader.read_to_end(&mut new)); } From 47aeb83da2a7ab15a2f500daeadfb95403c17b98 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 20:01:13 -0700 Subject: [PATCH 07/45] Use std::time instead of time crate for logo text, progress on https://github.com/iceiix/steven/issues/3 --- src/ui/logo.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/logo.rs b/src/ui/logo.rs index af6321ed..ce24a0ee 100644 --- a/src/ui/logo.rs +++ b/src/ui/logo.rs @@ -4,7 +4,7 @@ use std::f64::consts; use ui; use render; use resources; -use time; +use std::time::{SystemTime, UNIX_EPOCH}; use rand; use rand::Rng; @@ -134,10 +134,10 @@ impl Logo { } pub fn tick(&mut self, renderer: &mut render::Renderer) { - let now = time::now().to_timespec(); + let now = SystemTime::now().duration_since(UNIX_EPOCH).unwrap(); // Splash text - let text_index = (now.sec / 15) as isize % self.text_strings.len() as isize; + let text_index = (now.as_secs() / 15) as isize % self.text_strings.len() as isize; let mut text = self.text.borrow_mut(); if self.text_index != text_index { self.text_index = text_index; @@ -151,7 +151,7 @@ impl Logo { self.text_orig_x = text.x; } - let timer = now.nsec as f64 / 1000000000.0; + let timer = now.subsec_nanos() as f64 / 1000000000.0; let mut offset = timer / 0.5; if offset > 1.0 { offset = 2.0 - offset; From 163556fbf13c3df8fd6e8db6aa949129f648e05e Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 22:23:48 -0700 Subject: [PATCH 08/45] Use sha1 module for hashing instead of openssl, part of https://github.com/iceiix/steven/issues/2 --- Cargo.lock | 7 +++++++ Cargo.toml | 1 + src/main.rs | 1 + src/protocol/mojang.rs | 15 +++++++-------- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a34dc951..3a3ab83f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,6 +16,7 @@ dependencies = [ "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "steven_blocks 0.0.1", "steven_gl 0.0.1", "steven_resources 0.1.0", @@ -537,6 +538,11 @@ dependencies = [ "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sha1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "solicit" version = "0.4.4" @@ -755,6 +761,7 @@ dependencies = [ "checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" "checksum serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1b0e0732aa8ec4267f61815a396a942ba3525062e3bd5520aa8419927cfc0a92" "checksum serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b22e8a0554f31cb0f501e027de07b253553b308124f61c57598b9678dba35c0b" +"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" "checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" "checksum time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7ec6d62a20df54e07ab3b78b9a3932972f4b7981de295563686849eb3989af" diff --git a/Cargo.toml b/Cargo.toml index 7067df55..1f52c53e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ authors = [ "Thinkofdeath " ] opt-level = 1 [dependencies] +sha1 = "0.6.0" sdl2 = "0.31.0" byteorder = "0.5.0" hyper = "0.8.0" diff --git a/src/main.rs b/src/main.rs index 2e166e93..5bd901df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,6 +22,7 @@ extern crate time; extern crate byteorder; extern crate serde_json; extern crate openssl; +extern crate sha1; extern crate hyper; extern crate flate2; extern crate rand; diff --git a/src/protocol/mojang.rs b/src/protocol/mojang.rs index ee081e85..edf0a916 100644 --- a/src/protocol/mojang.rs +++ b/src/protocol/mojang.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use openssl::crypto::hash; +use sha1; use serde_json; use serde_json::builder::ObjectBuilder; use hyper; @@ -101,12 +101,11 @@ impl Profile { } pub fn join_server(&self, server_id: &str, shared_key: &[u8], public_key: &[u8]) -> Result<(), super::Error> { - use std::io::Write; - let mut sha1 = hash::Hasher::new(hash::Type::SHA1); - sha1.write_all(server_id.as_bytes()).unwrap(); - sha1.write_all(shared_key).unwrap(); - sha1.write_all(public_key).unwrap(); - let mut hash = sha1.finish(); + let mut sha1 = sha1::Sha1::new(); + sha1.update(server_id.as_bytes()); + sha1.update(shared_key); + sha1.update(public_key); + let mut hash = sha1.digest().bytes(); // Mojang uses a hex method which allows for // negatives so we have to account for that. @@ -147,7 +146,7 @@ impl Profile { } } -fn twos_compliment(data: &mut Vec) { +fn twos_compliment(data: &mut [u8]) { let mut carry = true; for i in (0..data.len()).rev() { data[i] = !data[i]; From 2f861f815abbfa31ca00c691d83402f9c63290ab Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 22:36:55 -0700 Subject: [PATCH 09/45] Use std::time for 5ms light updates instead of time crate More progress on https://github.com/iceiix/steven/issues/3 --- src/world/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/world/mod.rs b/src/world/mod.rs index 5893e011..975900e0 100644 --- a/src/world/mod.rs +++ b/src/world/mod.rs @@ -188,15 +188,14 @@ impl World { } pub fn tick(&mut self, m: &mut ecs::Manager) { - use time; - let start = time::precise_time_ns(); + use std::time::{Instant}; + let start = Instant::now(); let mut updates_performed = 0; while !self.light_updates.is_empty() { updates_performed += 1; self.do_light_update(); if updates_performed & 0xFFF == 0 { - let now = time::precise_time_ns(); - if (now - start) >= 5000000 { // 5 ms for light updates + if start.elapsed().subsec_nanos() >= 5000000 { // 5 ms for light updates break; } } From 9677f8ae9ca4ebd2b91ef27ad986486dfe59da7f Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 22:57:55 -0700 Subject: [PATCH 10/45] Use std::time for server ping, getting closer to eliminating use of 'time' crate, https://github.com/iceiix/steven/issues/3 --- src/protocol/mod.rs | 8 ++++---- src/screen/server_list.rs | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index ba6da376..4ada3219 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -31,7 +31,7 @@ use std::convert; use byteorder::{BigEndian, WriteBytesExt, ReadBytesExt}; use flate2::read::{ZlibDecoder, ZlibEncoder}; use flate2; -use time; +use std::time::{Instant, Duration}; use shared::Position; pub const SUPPORTED_PROTOCOL: i32 = 315; @@ -866,7 +866,7 @@ impl Conn { self.compression_threshold = threshold; } - pub fn do_status(mut self) -> Result<(Status, time::Duration), Error> { + pub fn do_status(mut self) -> Result<(Status, Duration), Error> { use serde_json::Value; use self::packet::status::serverbound::*; use self::packet::handshake::serverbound::Handshake; @@ -889,7 +889,7 @@ impl Conn { return Err(Error::Err("Wrong packet".to_owned())); }; - let start = time::now(); + let start = Instant::now(); try!(self.write_packet(StatusPing { ping: 42 })); if let Packet::StatusPong(_) = try!(self.read_packet()) { @@ -897,7 +897,7 @@ impl Conn { return Err(Error::Err("Wrong packet".to_owned())); }; - let ping = time::now() - start; + let ping = start.elapsed(); let val: Value = match serde_json::from_str(&status) { Ok(val) => val, diff --git a/src/screen/server_list.rs b/src/screen/server_list.rs index 9c073d22..5a7579cd 100644 --- a/src/screen/server_list.rs +++ b/src/screen/server_list.rs @@ -25,7 +25,7 @@ use format::{Component, TextComponent}; use protocol; use serde_json; -use time; +use std::time::{Duration}; use image; use rustc_serialize::base64::FromBase64; use rand; @@ -69,7 +69,7 @@ struct Server { struct PingInfo { motd: format::Component, - ping: time::Duration, + ping: Duration, exists: bool, online: i32, max: i32, @@ -288,7 +288,7 @@ impl ServerList { msg.modifier.color = Some(format::Color::Red); let _ = send.send(PingInfo { motd: Component::Text(msg), - ping: time::Duration::seconds(99999), + ping: Duration::new(99999, 0), exists: false, online: 0, max: 0, @@ -465,7 +465,9 @@ impl super::Screen for ServerList { s.done_ping = true; s.motd.borrow_mut().set_text(res.motd); // Selects the icon for the given ping range - let y = match res.ping.num_milliseconds() { + // TODO: switch to as_millis() experimental duration_as_u128 #50202 once available? + let ping_ms = (res.ping.subsec_nanos() as f64)/1000000.0 + (res.ping.as_secs() as f64)*1000.0; + let y = match ping_ms.round() as u64 { _x @ 0 ... 75 => 16.0 / 256.0, _x @ 76 ... 150 => 24.0 / 256.0, _x @ 151 ... 225 => 32.0 / 256.0, From 6eaf1688f48a59c07783fd9be128b8a52cc30a43 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 23:11:47 -0700 Subject: [PATCH 11/45] Remove time crate in favor of std::time, removing last usage in main Combined with these changes, which also convert to std::time: https://github.com/iceiix/steven/commit/47aeb83da2a7ab15a2f500daeadfb95403c17b98 logo text https://github.com/iceiix/steven/commit/2f861f815abbfa31ca00c691d83402f9c63290ab light updates https://github.com/iceiix/steven/commit/9677f8ae9ca4ebd2b91ef27ad986486dfe59da7f server ping --- Cargo.lock | 1 - Cargo.toml | 1 - src/main.rs | 18 +++++++++--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3a3ab83f..68ff6bf1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,7 +21,6 @@ dependencies = [ "steven_gl 0.0.1", "steven_resources 0.1.0", "steven_shared 0.0.1", - "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "zip 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/Cargo.toml b/Cargo.toml index 1f52c53e..6cb9a5bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,6 @@ serde_json = "0.7.0" flate2 = "0.2.13" zip = "0.1.16" image = "0.7.0" -time = "0.1.34" rand = "0.3.14" rustc-serialize = "0.3.18" log = "0.3.5" diff --git a/src/main.rs b/src/main.rs index 5bd901df..ddffb7e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,7 @@ extern crate sdl2; extern crate zip; extern crate image; -extern crate time; +use std::time::{Instant, Duration}; extern crate byteorder; extern crate serde_json; extern crate openssl; @@ -213,8 +213,8 @@ fn main() { let renderer = render::Renderer::new(resource_manager.clone()); let mut ui_container = ui::Container::new(); - let mut last_frame = time::now(); - let frame_time = (time::Duration::seconds(1).num_nanoseconds().unwrap() as f64) / 60.0; + let mut last_frame = Instant::now(); + let frame_time = 1e9f64 / 60.0; let mut screen_sys = screen::ScreenSystem::new(); screen_sys.add_screen(Box::new(screen::Login::new(vars.clone()))); @@ -238,10 +238,10 @@ fn main() { let mut events = game.sdl.event_pump().unwrap(); while !game.should_close { - let now = time::now(); - let diff = now - last_frame; + let now = Instant::now(); + let diff = now.duration_since(last_frame); last_frame = now; - let delta = (diff.num_nanoseconds().unwrap() as f64) / frame_time; + let delta = (diff.subsec_nanos() as f64) / frame_time; let (width, height) = window.drawable_size(); let version = { @@ -274,10 +274,10 @@ fn main() { if fps_cap > 0 && !vsync { - let frame_time = time::now() - now; - let sleep_interval = time::Duration::milliseconds(1000 / fps_cap); + let frame_time = now.elapsed(); + let sleep_interval = Duration::from_millis(1000 / fps_cap as u64); if frame_time < sleep_interval { - thread::sleep((sleep_interval - frame_time).to_std().unwrap()); + thread::sleep(sleep_interval - frame_time); } } window.gl_swap_window(); From cb1d282381b07f009df9ac1d316fc46e3139553f Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 23:18:05 -0700 Subject: [PATCH 12/45] Update to rustc-serialize 0.3.24, for nightly-2018-01-04 compatibility Allows upgrading from nightly-2017-10-12 to nightly-2018-01-04 which is aligned with Rust version 1.23.0 https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1230-2018-01-04 See https://github.com/iceiix/steven/issues/3#issuecomment-425688203 --- Cargo.lock | 642 +++++++++++++++++++++++++++++++++++------------------ Cargo.toml | 2 +- 2 files changed, 433 insertions(+), 211 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68ff6bf1..e7f47485 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,27 +1,9 @@ -[root] -name = "steven" -version = "0.0.1" +[[package]] +name = "arrayvec" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", - "flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "image 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "steven_blocks 0.0.1", - "steven_gl 0.0.1", - "steven_resources 0.1.0", - "steven_shared 0.0.1", - "zip 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -34,6 +16,11 @@ name = "bitflags" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bitflags" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" version = "0.4.2" @@ -44,24 +31,34 @@ name = "byteorder" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "byteorder" +version = "1.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "bzip2" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bzip2-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bzip2-sys" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "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)", ] +[[package]] +name = "cc" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cfg-if" version = "0.1.5" @@ -72,9 +69,9 @@ name = "cgmath" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -83,12 +80,12 @@ version = "0.5.1" source = "git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e#f80825eca687ff1053ff492e54fa782944c9cf6b" dependencies = [ "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "color_quant" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -97,39 +94,81 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "deque" +name = "crossbeam-deque" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-epoch" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-utils" +version = "0.2.2" +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)", ] +[[package]] +name = "either" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "enum_primitive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "flate2" -version = "0.2.14" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "gcc" -version = "0.3.35" +version = "0.3.54" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -146,7 +185,7 @@ name = "gif" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "lzw 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -155,8 +194,8 @@ name = "gl_generator" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -170,12 +209,12 @@ name = "hpack" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "httparse" -version = "1.1.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -184,29 +223,29 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "idna" -version = "0.1.0" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -215,11 +254,11 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "enum_primitive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "gif 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "jpeg-decoder 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "png 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -235,11 +274,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jpeg-decoder" -version = "0.1.6" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -253,7 +292,7 @@ dependencies = [ [[package]] name = "khronos_api" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -268,12 +307,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazy_static" -version = "0.2.1" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lazy_static" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "libc" -version = "0.2.15" +version = "0.2.43" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -281,13 +328,24 @@ name = "libressl-pnacl-sys" version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "pnacl-build-helper 1.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "pnacl-build-helper 1.4.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.3.6" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "log" +version = "0.4.5" +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)", +] [[package]] name = "lzw" @@ -296,100 +354,117 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "matches" -version = "0.1.2" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "memoffset" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "mime" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miniz-sys" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "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)", ] [[package]] name = "msdos_time" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "nodrop" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "num" -version = "0.1.35" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-bigint 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", + "num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-bigint" -version = "0.1.35" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-complex" -version = "0.1.35" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-integer" -version = "0.1.32" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-iter" -version = "0.1.32" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-rational" -version = "0.1.35" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-traits" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-bigint 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.1.35" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -397,7 +472,15 @@ name = "num_cpus" version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num_cpus" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -406,9 +489,9 @@ version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.54 (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)", "openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys-extras 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -419,9 +502,9 @@ version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "libressl-pnacl-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -430,22 +513,28 @@ name = "openssl-sys-extras" version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pkg-config" -version = "0.3.8" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pnacl-build-helper" -version = "1.4.10" +version = "1.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -454,58 +543,100 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", "inflate 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "podio" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rand" -version = "0.3.14" +version = "0.3.22" +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)", + "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "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.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rayon" -version = "0.4.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rayon-core" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "redox_syscall" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "remove_dir_all" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-serialize" -version = "0.3.19" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "rustc_version" -version = "0.1.7" +name = "same-file" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "sdl2" version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.14 (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)", + "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -517,11 +648,6 @@ dependencies = [ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "semver" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "serde" version = "0.7.15" @@ -533,7 +659,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -548,7 +674,33 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "steven" +version = "0.0.1" +dependencies = [ + "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", + "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "steven_blocks 0.0.1", + "steven_gl 0.0.1", + "steven_resources 0.1.0", + "steven_shared 0.0.1", + "zip 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -566,8 +718,8 @@ name = "steven_gl" version = "0.0.1" dependencies = [ "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -580,20 +732,21 @@ version = "0.0.1" [[package]] name = "tempdir" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "time" -version = "0.1.35" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -608,23 +761,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicase" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicode-bidi" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicode-normalization" -version = "0.1.2" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -632,20 +793,21 @@ name = "url" version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "url" -version = "1.2.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -662,7 +824,22 @@ name = "uuid" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "walkdir" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -670,11 +847,30 @@ name = "winapi" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi" +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)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "xml-rs" version = "0.2.2" @@ -685,95 +881,121 @@ dependencies = [ [[package]] name = "zip" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bzip2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "msdos_time 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", + "msdos_time 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] +"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "32866f4d103c4e438b1db1158aa1b1a80ee078e5d77a59a2f906fd62a577389c" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" +"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96c8b41881888cc08af32d47ac4edd52bc7fa27fef774be47a92443756451304" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" -"checksum bzip2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c30a578393daf45ee6101aa043afa8d47a7e70f05032b15b88b28a7111c6a53" -"checksum bzip2-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "81c91586be5d862524de53126d49c11fef83dc1a8e8034235f37372e3b2da311" +"checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" +"checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" +"checksum bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5162604199bbb17690ede847eaa6120a3f33d5ab4dcc8e7c25b16d849ae79b" +"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" "checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" "checksum cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75e93b3eb66e74ffb946a69ff54c6026c1399960241c843f249ea0127b96b9f6" "checksum collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)" = "" -"checksum color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a475fc4af42d83d28adf72968d9bcfaf035a1a9381642d8e85d8a04957767b0d" +"checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" "checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626" -"checksum deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1614659040e711785ed8ea24219140654da1729f3ec8a47a9719d041112fe7bf" -"checksum enum_primitive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f79eff5be92a4d7d5bddf7daa7d650717ea71628634efe6ca7bcda85b2183c23" -"checksum flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "3eeb481e957304178d2e782f2da1257f1434dfecbae883bafb61ada2a9fea3bb" -"checksum gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "91ecd03771effb0c968fd6950b37e89476a578aaf1c70297d8e92b6516ec3312" +"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" +"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" +"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" +"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" +"checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" +"checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" "checksum gif 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45403dbb4c5208d0e0f46e663e9df19abb84f1ab2ec8c5a830eafea41ad10df3" "checksum gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "37905b2d6c7ade3f675d4b03cc038709c7868b938c5950f05a4a03f299b21011" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" -"checksum httparse 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "46534074dbb80b070d60a5cb8ecadd8963a00a438ae1a95268850a7ef73b67ae" +"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb0f4d00bb781e559b6e66ae4b5479df0fdf9ab15949f52fa2f1f5de16d4cc07" -"checksum idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1053236e00ce4f668aeca4a769a09b3bf5a682d802abd6f3cb39374f6b162c11" +"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum image 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "439bfcbcf8a0ef6064c53d4d4c03e5df549415c2088e381ef0d7c8225c47bd1a" "checksum inflate 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7e0062d2dc2f17d2f13750d95316ae8a2ff909af0fda957084f5defd87c43bb" "checksum itoa 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae3088ea4baeceb0284ee9eea42f591226e6beaecf65373e41b38d95a1b8e7a1" -"checksum jpeg-decoder 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "70be4c5ed7c80bb403fb28d95d30dd97ccf76829e943ae2350037fd6cd6961b6" +"checksum jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b7d43206b34b3f94ea9445174bda196e772049b9bddbc620c9d29b2d20110d" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09c9d3760673c427d46f91a0350f0a84a52e6bc5a84adf26dc610b6c52436630" +"checksum khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d5a08e2a31d665af8f1ca437eab6d00a93c9d62a549f73f9ed8fc2e55b5a91a7" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" -"checksum lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "49247ec2a285bb3dcb23cbd9c35193c025e7251bfce77c1d5da97e6362dffe7f" -"checksum libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "23e3757828fa702a20072c37ff47938e9dd331b92fac6e223d26d4b7a55f7ee2" +"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 libressl-pnacl-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "cbc058951ab6a3ef35ca16462d7642c4867e6403520811f28537a4e2f2db3e71" -"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054" +"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" "checksum lzw 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cba82344432e19bcb98fa21c5a6e78f42a06252b4744e2e9162ae98b3a01ee92" -"checksum matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "15305656809ce5a4805b1ff2946892810992197ce1270ff79baded852187942e" -"checksum mime 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5c93a4bd787ddc6e7833c519b73a50883deb5863d76d9b71eb8216fb7f94e66" -"checksum miniz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d1f4d337a01c32e1f2122510fed46393d53ca35a7f429cb0450abaedfa3ed54" -"checksum msdos_time 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c04b68cc63a8480fb2550343695f7be72effdec953a9d4508161c3e69041c7d8" -"checksum num 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9699207fab8b02bd0e56f8f06fee3f26d640303130de548898b4c9704f6d01" -"checksum num-bigint 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "88b14378471f7c2adc5262f05b4701ef53e8da376453a8d8fee48e51db745e49" -"checksum num-complex 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c78e054dd19c3fd03419ade63fa661e9c49bb890ce3beb4eee5b7baf93f92f" -"checksum num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "fb24d9bfb3f222010df27995441ded1e954f8f69cd35021f6bef02ca9552fb92" -"checksum num-iter 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "287a1c9969a847055e1122ec0ea7a5c5d6f72aad97934e131c83d5c08ab4e45c" -"checksum num-rational 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "54ff603b8334a72fbb27fe66948aac0abaaa40231b3cecd189e76162f6f38aaf" -"checksum num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "8359ea48994f253fa958b5b90b013728b06f54872e5a58bce39540fcdd0f2527" +"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" +"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" +"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" +"checksum msdos_time 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aad9dfe950c057b1bfe9c1f2aa51583a8468ef2a5baba2ebbe06d775efeb7729" +"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" +"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" +"checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" +"checksum num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "b288631d7878aaf59442cffd36910ea604ecd7745c36054328595114001c9656" +"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" +"checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" +"checksum num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" +"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3" +"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)" = "c4117b6244aac42ed0150a6019b4d953d28247c5dd6ae6f46ae469b5f2318733" "checksum openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)" = "89c47ee94c352eea9ddaf8e364be7f978a3bb6d66d73176572484238dd5a5c3f" "checksum openssl-sys-extras 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)" = "11c5e1dba7d3d03d80f045bf0d60111dc69213b67651e7c889527a3badabb9fa" -"checksum pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8cee804ecc7eaf201a4a207241472cc870e825206f6c031e3ee2a72fa425f2fa" -"checksum pnacl-build-helper 1.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "61c9231d31aea845007443d62fcbb58bb6949ab9c18081ee1e09920e0cf1118b" +"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" +"checksum pnacl-build-helper 1.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dfbe13ee77c06fb633d71c72438bd983286bb3521863a753ade8e951c7efb090" "checksum png 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "668644d06046819b75098c990e291c4cbadb4a2d1b2424211bf1321005ec764a" -"checksum podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e5422a1ee1bc57cc47ae717b0137314258138f38fd5f3cea083f43a9725383a0" -"checksum rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2791d88c6defac799c3f20d74f094ca33b9332612d9aef9078519c82e4fe04a5" -"checksum rayon 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e501871917624668fe601ad12a730450414f9b0b64722a898b040ce3ae1b0fa" -"checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" -"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" +"checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" +"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" +"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" +"checksum rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "df7a791f788cb4c516f0e091301a29c2b71ef680db5e644a7d68835c8ae6dbfa" +"checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" +"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" +"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" +"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" +"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a74c2a98a354b20713b90cce70aef9e927e46110d1bc4ef728fd74e0d53eba60" "checksum sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c543ce8a6e33a30cb909612eeeb22e693848211a84558d5a00bb11e791b7ab7" -"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" "checksum serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1b0e0732aa8ec4267f61815a396a942ba3525062e3bd5520aa8419927cfc0a92" "checksum serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b22e8a0554f31cb0f501e027de07b253553b308124f61c57598b9678dba35c0b" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" -"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" -"checksum time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7ec6d62a20df54e07ab3b78b9a3932972f4b7981de295563686849eb3989af" +"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +"checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" "checksum traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "07eaeb7689bb7fca7ce15628319635758eda769fed481ecfe6686ddef2600616" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764" -"checksum unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c1f7ceb96afdfeedee42bade65a0d585a6a0106f681b6749c8ff4daa8df30b3f" -"checksum unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "26643a2f83bac55f1976fb716c10234485f9202dcd65cfbdf9da49867b271172" +"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" +"checksum unicode-bidi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "149319afc0ec718611d4a9208c0308e3b1b62dcfbd982e5e723f6ec35b909b92" +"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +"checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" "checksum url 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4a3440c1ed62af4a2aee71c6fb78ef32ddcb75cfa24bf42f45e07c02b6d6a2f6" -"checksum url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afe9ec54bc4db14bc8744b7fed060d785ac756791450959b2248443319d5b119" +"checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" "checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" "checksum uuid 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "885acc3b17fdef6230d1f7765dff1106dfd5e75a93c2f26459fbf600ed6dcc14" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"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" "checksum xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d7c34f934fa02d71d33e03f2eceecd0adfe881d9acddbbd908318e12d449ebf" -"checksum zip 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "3ceb33a75b3d0608942302eed325b59d2c3ed777cc6c01627ae14e5697c6a31c" +"checksum zip 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "c0deac03fc7d43abcf19f2c2db6bd9289f9ea3d31f350e26eb0ed8b4117983c1" diff --git a/Cargo.toml b/Cargo.toml index 6cb9a5bc..19591360 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ flate2 = "0.2.13" zip = "0.1.16" image = "0.7.0" rand = "0.3.14" -rustc-serialize = "0.3.18" +rustc-serialize = "0.3.24" log = "0.3.5" cgmath = "0.7.0" lazy_static = "0.1.15" From d6fa1d0a0b8afa0a955f1be723a2e3d6472001aa Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 23:28:38 -0700 Subject: [PATCH 13/45] Fix warning: unnecessary parentheses around function argument, new in nightly-2018-02-15 --- src/entity/player.rs | 2 +- src/model/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/entity/player.rs b/src/entity/player.rs index 6892c5dc..85820600 100644 --- a/src/entity/player.rs +++ b/src/entity/player.rs @@ -198,7 +198,7 @@ impl ecs::System for PlayerRenderer { }; let offset_matrix = Matrix4::from(Decomposed { scale: 1.0, - rot: Quaternion::from_angle_y(Rad::new((PI + rotation.yaw as f32))), + rot: Quaternion::from_angle_y(Rad::new(PI + rotation.yaw as f32)), disp: offset, }); diff --git a/src/model/mod.rs b/src/model/mod.rs index bfd5f23b..7f244f54 100644 --- a/src/model/mod.rs +++ b/src/model/mod.rs @@ -958,8 +958,8 @@ fn calculate_light(snapshot: &world::Snapshot, orig_x: i32, orig_y: i32, orig_z: let mut sky_light = 0u32; let mut count = 0; - let s_block_light = max(((s_block_light as i8) - 8), 0) as u8; - let s_sky_light = max(((s_sky_light as i8) - 8), 0) as u8; + let s_block_light = max((s_block_light as i8) - 8, 0) as u8; + let s_sky_light = max((s_sky_light as i8) - 8, 0) as u8; let dx = (ox as f64) * 0.6; let dy = (oy as f64) * 0.6; From be46377842ba9270e81e416a3aeb1e4aa0fb85f8 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 29 Sep 2018 23:52:47 -0700 Subject: [PATCH 14/45] Remove unused macros and imports to appease compiler warnings https://github.com/iceiix/steven/issues/1 --- blocks/src/lib.rs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/blocks/src/lib.rs b/blocks/src/lib.rs index 1d4381af..bc4ecec2 100644 --- a/blocks/src/lib.rs +++ b/blocks/src/lib.rs @@ -8,7 +8,7 @@ extern crate lazy_static; extern crate steven_shared as shared; use shared::{Axis, Direction, Position}; -use collision::{Aabb, Aabb3}; +use collision::Aabb3; use cgmath::Point3; pub mod material; @@ -44,25 +44,6 @@ macro_rules! create_ids { ); } -macro_rules! consume_token { ($i:tt) => (0) } - -macro_rules! offsets { - ($first:ident, $($other:ident),*) => ( - #[allow(non_upper_case_globals)] - pub const $first: usize = 0; - offsets!(prev($first), $($other),*); - ); - (prev($prev:ident), $first:ident, $($other:ident),*) => ( - #[allow(non_upper_case_globals)] - pub const $first: usize = $prev + internal_sizes::$prev; - offsets!(prev($first), $($other),*); - ); - (prev($prev:ident), $first:ident) => ( - #[allow(non_upper_case_globals)] - pub const $first: usize = $prev + internal_sizes::$prev; - ) -} - macro_rules! define_blocks { ( $( From 8ca41dfcdab066f5d64913b621ef4e43957dc77f Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 00:16:16 -0700 Subject: [PATCH 15/45] Update gl-generator, fixes hundreds of non_upper_case_globals warnings Resolves most of https://github.com/iceiix/steven/issues/1 --- Cargo.lock | 24 +++++++++++++++--------- gl/Cargo.toml | 2 +- gl/build.rs | 13 ++++++++----- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e7f47485..3253ebe7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -191,12 +191,12 @@ dependencies = [ [[package]] name = "gl_generator" -version = "0.4.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -295,6 +295,11 @@ name = "khronos_api" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "khronos_api" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "language-tags" version = "0.2.2" @@ -717,7 +722,7 @@ dependencies = [ name = "steven_gl" version = "0.0.1" dependencies = [ - "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -873,10 +878,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "xml-rs" -version = "0.2.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -918,7 +923,7 @@ dependencies = [ "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" "checksum gif 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45403dbb4c5208d0e0f46e663e9df19abb84f1ab2ec8c5a830eafea41ad10df3" -"checksum gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "37905b2d6c7ade3f675d4b03cc038709c7868b938c5950f05a4a03f299b21011" +"checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" @@ -930,6 +935,7 @@ dependencies = [ "checksum jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b7d43206b34b3f94ea9445174bda196e772049b9bddbc620c9d29b2d20110d" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d5a08e2a31d665af8f1ca437eab6d00a93c9d62a549f73f9ed8fc2e55b5a91a7" +"checksum khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "037ab472c33f67b5fbd3e9163a2645319e5356fcd355efa6d4eb7fff4bbcb554" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" @@ -997,5 +1003,5 @@ dependencies = [ "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" -"checksum xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d7c34f934fa02d71d33e03f2eceecd0adfe881d9acddbbd908318e12d449ebf" +"checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" "checksum zip 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "c0deac03fc7d43abcf19f2c2db6bd9289f9ea3d31f350e26eb0ed8b4117983c1" diff --git a/gl/Cargo.toml b/gl/Cargo.toml index 73961a6d..2aaa3ff2 100644 --- a/gl/Cargo.toml +++ b/gl/Cargo.toml @@ -5,7 +5,7 @@ authors = [ "Thinkofdeath " ] build = "build.rs" [build-dependencies] -gl_generator = "0.4.2" +gl_generator = "0.9.0" khronos_api = "1.0.0" [dependencies] diff --git a/gl/build.rs b/gl/build.rs index b64bffcf..3ce96105 100644 --- a/gl/build.rs +++ b/gl/build.rs @@ -5,15 +5,18 @@ use std::env; use std::fs::File; use std::io::BufWriter; use std::path::Path; +use gl_generator::{Registry, Api, Profile, Fallbacks, GlobalGenerator}; fn main() { let out_dir = env::var("OUT_DIR").unwrap(); let dest = Path::new(&out_dir); let mut file = BufWriter::new(File::create(&dest.join("bindings.rs")).unwrap()); - gl_generator::generate_bindings(gl_generator::GlobalGenerator, - gl_generator::registry::Ns::Gl, - gl_generator::Fallbacks::All, - khronos_api::GL_XML, vec![], "3.2", "core", - &mut file).unwrap(); + Registry::new(Api::Gl, + (3, 2), + Profile::Core, + Fallbacks::All, + []) + .write_bindings(GlobalGenerator, &mut file) + .unwrap(); } From 562ab9dbc41e47cc7208041329040b8c82ab41fe Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 00:25:07 -0700 Subject: [PATCH 16/45] Remove unused username field in Server. Closes https://github.com/iceiix/steven/issues/1 --- src/server/mod.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/server/mod.rs b/src/server/mod.rs index 3e381ab6..14a62333 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -37,7 +37,6 @@ pub mod plugin_messages; pub mod target; pub struct Server { - username: String, uuid: protocol::UUID, conn: Option, read_queue: Option>>, @@ -138,7 +137,7 @@ impl Server { read.state = protocol::State::Play; write.state = protocol::State::Play; let rx = Self::spawn_reader(read); - return Ok(Server::new(val.username, protocol::UUID::from_str(&val.uuid), resources, Some(write), Some(rx))); + return Ok(Server::new(protocol::UUID::from_str(&val.uuid), resources, Some(write), Some(rx))); } protocol::packet::Packet::LoginDisconnect(val) => return Err(protocol::Error::Disconnect(val.reason)), val => return Err(protocol::Error::Err(format!("Wrong packet: {:?}", val))), @@ -165,7 +164,6 @@ impl Server { read.enable_encyption(&shared, true); write.enable_encyption(&shared, false); - let username; let uuid; loop { match try!(read.read_packet()) { @@ -175,7 +173,6 @@ impl Server { } protocol::packet::Packet::LoginSuccess(val) => { debug!("Login: {} {}", val.username, val.uuid); - username = val.username; uuid = val.uuid; read.state = protocol::State::Play; write.state = protocol::State::Play; @@ -188,7 +185,7 @@ impl Server { let rx = Self::spawn_reader(read); - Ok(Server::new(username, protocol::UUID::from_str(&uuid), resources, Some(write), Some(rx))) + Ok(Server::new(protocol::UUID::from_str(&uuid), resources, Some(write), Some(rx))) } fn spawn_reader(mut read: protocol::Conn) -> mpsc::Receiver> { @@ -209,7 +206,7 @@ impl Server { } pub fn dummy_server(resources: Arc>) -> Server { - let mut server = Server::new("dummy".to_owned(), protocol::UUID::default(), resources, None, None); + let mut server = Server::new(protocol::UUID::default(), resources, None, None); let mut rng = rand::thread_rng(); for x in -7*16 .. 7*16 { for z in -7*16 .. 7*16 { @@ -245,7 +242,7 @@ impl Server { } fn new( - username: String, uuid: protocol::UUID, + uuid: protocol::UUID, resources: Arc>, conn: Option, read_queue: Option>> ) -> Server { @@ -258,7 +255,6 @@ impl Server { let version = resources.read().unwrap().version(); Server { - username: username, uuid: uuid, conn: conn, read_queue: read_queue, From 51a88ab95bb959b5b5e9a71186f87857b76b05d7 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 13:53:22 -0700 Subject: [PATCH 17/45] Update to byteorder 1.2.6 https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 8 +------- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3253ebe7..30742693 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,11 +26,6 @@ name = "byteorder" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "byteorder" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "byteorder" version = "1.2.6" @@ -686,7 +681,7 @@ dependencies = [ name = "steven" version = "0.0.1" dependencies = [ - "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", @@ -902,7 +897,6 @@ dependencies = [ "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96c8b41881888cc08af32d47ac4edd52bc7fa27fef774be47a92443756451304" -"checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" "checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" "checksum bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5162604199bbb17690ede847eaa6120a3f33d5ab4dcc8e7c25b16d849ae79b" diff --git a/Cargo.toml b/Cargo.toml index 19591360..81942612 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ opt-level = 1 [dependencies] sha1 = "0.6.0" sdl2 = "0.31.0" -byteorder = "0.5.0" +byteorder = "1.2.6" hyper = "0.8.0" serde = "0.7.0" serde_json = "0.7.0" From fd2c51eac42f90699e7534dfbc7f830e1280db15 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 16:19:24 -0700 Subject: [PATCH 18/45] Update to flate2 1.0.2 https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 12 +++++++++++- Cargo.toml | 2 +- src/protocol/mod.rs | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 30742693..7a097a10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -147,6 +147,15 @@ dependencies = [ "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "flate2" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -684,7 +693,7 @@ dependencies = [ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", - "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -912,6 +921,7 @@ dependencies = [ "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" "checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423" +"checksum flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "37847f133aae7acf82bb9577ccd8bda241df836787642654286e79679826a54b" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" diff --git a/Cargo.toml b/Cargo.toml index 81942612..094ad367 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ byteorder = "1.2.6" hyper = "0.8.0" serde = "0.7.0" serde_json = "0.7.0" -flate2 = "0.2.13" +flate2 = "1.0.2" zip = "0.1.16" image = "0.7.0" rand = "0.3.14" diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 4ada3219..2ae6e3f0 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -30,7 +30,7 @@ use std::io::{Write, Read}; use std::convert; use byteorder::{BigEndian, WriteBytesExt, ReadBytesExt}; use flate2::read::{ZlibDecoder, ZlibEncoder}; -use flate2; +use flate2::Compression; use std::time::{Instant, Duration}; use shared::Position; @@ -788,7 +788,7 @@ impl Conn { }; if self.compression_threshold >= 0 && buf.len() as i32 > self.compression_threshold { if self.compression_write.is_none() { - self.compression_write = Some(ZlibEncoder::new(io::Cursor::new(Vec::new()), flate2::Compression::Default)); + self.compression_write = Some(ZlibEncoder::new(io::Cursor::new(Vec::new()), Compression::default())); } extra = 0; let uncompressed_size = buf.len(); From a25eaf14764638d5176ed8d8d180400cf81bb7db Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 16:20:33 -0700 Subject: [PATCH 19/45] Update to zip 0.4.2 https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- Cargo.toml | 2 +- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a097a10..0d55aa29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,8 @@ +[[package]] +name = "adler32" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "arrayvec" version = "0.4.7" @@ -21,6 +26,11 @@ name = "bitflags" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "build_const" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" version = "0.4.2" @@ -94,6 +104,14 @@ dependencies = [ "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crc" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-deque" version = "0.2.0" @@ -154,6 +172,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)", "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide_c_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -388,6 +407,26 @@ dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "miniz_oxide" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz_oxide_c_api" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "msdos_time" version = "0.1.6" @@ -709,7 +748,7 @@ dependencies = [ "steven_gl 0.0.1", "steven_resources 0.1.0", "steven_shared 0.0.1", - "zip 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "zip 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -890,21 +929,23 @@ dependencies = [ [[package]] name = "zip" -version = "0.1.19" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "msdos_time 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] +"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "32866f4d103c4e438b1db1158aa1b1a80ee078e5d77a59a2f906fd62a577389c" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" "checksum byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96c8b41881888cc08af32d47ac4edd52bc7fa27fef774be47a92443756451304" "checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" "checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" @@ -915,6 +956,7 @@ dependencies = [ "checksum collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)" = "" "checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" "checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626" +"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" @@ -953,6 +995,8 @@ dependencies = [ "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" +"checksum miniz_oxide 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9ba430291c9d6cedae28bcd2d49d1c32fc57d60cd49086646c5dd5673a870eb5" +"checksum miniz_oxide_c_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5a5b8234d6103ebfba71e29786da4608540f862de5ce980a1c94f86a40ca0d51" "checksum msdos_time 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aad9dfe950c057b1bfe9c1f2aa51583a8468ef2a5baba2ebbe06d775efeb7729" "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" @@ -1008,4 +1052,4 @@ dependencies = [ "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" "checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" -"checksum zip 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "c0deac03fc7d43abcf19f2c2db6bd9289f9ea3d31f350e26eb0ed8b4117983c1" +"checksum zip 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "36b9e08fb518a65cf7e08a1e482573eb87a2f4f8c6619316612a3c1f162fe822" diff --git a/Cargo.toml b/Cargo.toml index 094ad367..3a6b82ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ hyper = "0.8.0" serde = "0.7.0" serde_json = "0.7.0" flate2 = "1.0.2" -zip = "0.1.16" +zip = "0.4.2" image = "0.7.0" rand = "0.3.14" rustc-serialize = "0.3.24" From 43f6565fa546178a1f9771cbf3940be74c970cfc Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 16:36:00 -0700 Subject: [PATCH 20/45] Update to log 0.4.5 https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/console/mod.rs | 29 ++++++++++++++++------------- src/main.rs | 6 ++---- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d55aa29..8a43b2a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -736,7 +736,7 @@ dependencies = [ "hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 3a6b82ed..073459f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ zip = "0.4.2" image = "0.7.0" rand = "0.3.14" rustc-serialize = "0.3.24" -log = "0.3.5" +log = "0.4.5" cgmath = "0.7.0" lazy_static = "0.1.15" collision = {git = "https://github.com/TheUnnamedDude/collision-rs", rev = "f80825e"} diff --git a/src/console/mod.rs b/src/console/mod.rs index d3703d9c..0474ebfa 100644 --- a/src/console/mod.rs +++ b/src/console/mod.rs @@ -273,21 +273,21 @@ impl Console { } } - fn log(&mut self, record: &log::LogRecord) { + fn log(&mut self, record: &log::Record) { for filtered in FILTERED_CRATES { - if record.location().module_path().starts_with(filtered) { + if record.module_path().unwrap_or("").starts_with(filtered) { return; } } - let mut file = &record.location().file().replace("\\", "/")[..]; + let mut file = &record.file().unwrap_or("").replace("\\", "/")[..]; if let Some(pos) = file.rfind("src/") { file = &file[pos + 4..]; } println!("[{}:{}][{}] {}", file, - record.location().line(), + record.line().unwrap_or(0), record.level(), record.args()); self.history.remove(0); @@ -301,7 +301,7 @@ impl Console { }, Component::Text(TextComponent::new(":")), { - let mut msg = TextComponent::new(&format!("{}", record.location().line())); + let mut msg = TextComponent::new(&format!("{}", record.line().unwrap_or(0))); msg.modifier.color = Some(Color::Aqua); Component::Text(msg) }, @@ -310,11 +310,11 @@ impl Console { { let mut msg = TextComponent::new(&format!("{}", record.level())); msg.modifier.color = Some(match record.level() { - log::LogLevel::Debug => Color::Green, - log::LogLevel::Error => Color::Red, - log::LogLevel::Warn => Color::Yellow, - log::LogLevel::Info => Color::Aqua, - log::LogLevel::Trace => Color::Blue, + log::Level::Debug => Color::Green, + log::Level::Error => Color::Red, + log::Level::Warn => Color::Yellow, + log::Level::Info => Color::Aqua, + log::Level::Trace => Color::Blue, }); Component::Text(msg) }, @@ -337,15 +337,18 @@ impl ConsoleProxy { } impl log::Log for ConsoleProxy { - fn enabled(&self, metadata: &log::LogMetadata) -> bool { - metadata.level() <= log::LogLevel::Trace + fn enabled(&self, metadata: &log::Metadata) -> bool { + metadata.level() <= log::Level::Trace } - fn log(&self, record: &log::LogRecord) { + fn log(&self, record: &log::Record) { if self.enabled(record.metadata()) { self.console.lock().unwrap().log(record); } } + + fn flush(&self) { + } } unsafe impl Send for ConsoleProxy {} diff --git a/src/main.rs b/src/main.rs index ddffb7e5..3812d95a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -177,10 +177,8 @@ fn main() { let proxy = console::ConsoleProxy::new(con.clone()); - log::set_logger(|max_log_level| { - max_log_level.set(log::LogLevelFilter::Trace); - Box::new(proxy) - }).unwrap(); + log::set_boxed_logger(Box::new(proxy)).unwrap(); + log::set_max_level(log::LevelFilter::Trace); info!("Starting steven"); From 9f49d10eb3b8b6511597ceb592567f4d9dce5950 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 17:11:22 -0700 Subject: [PATCH 21/45] Update to lazy_static 1.1.0 https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a43b2a4..fabeb6b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -735,7 +735,7 @@ dependencies = [ "flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 073459f4..4f60d82d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ rand = "0.3.14" rustc-serialize = "0.3.24" log = "0.4.5" cgmath = "0.7.0" -lazy_static = "0.1.15" +lazy_static = "1.1.0" collision = {git = "https://github.com/TheUnnamedDude/collision-rs", rev = "f80825e"} openssl = "0.7.8" # clippy = "*" From fe9991055056d71af9c671d8d6221c653de25fd4 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 17:21:05 -0700 Subject: [PATCH 22/45] Update to image 0.20.0 --- Cargo.lock | 165 ++++++++++++++++++++++++++++++---------------- Cargo.toml | 2 +- src/model/mod.rs | 2 +- src/render/mod.rs | 2 +- src/render/ui.rs | 2 +- 5 files changed, 113 insertions(+), 60 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fabeb6b9..723ef0a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,11 +11,6 @@ dependencies = [ "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "bitflags" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "bitflags" version = "0.7.0" @@ -31,11 +26,6 @@ name = "build_const" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "byteorder" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "byteorder" version = "1.2.6" @@ -144,26 +134,18 @@ dependencies = [ ] [[package]] -name = "either" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "enum_primitive" -version = "0.1.1" +name = "deflate" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "flate2" -version = "0.2.20" +name = "either" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "flate2" @@ -205,11 +187,11 @@ dependencies = [ [[package]] name = "gif" -version = "0.7.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lzw 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -222,11 +204,6 @@ dependencies = [ "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "glob" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "hpack" version = "0.2.0" @@ -273,22 +250,28 @@ dependencies = [ [[package]] name = "image" -version = "0.7.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gif 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "png 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tiff 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "inflate" -version = "0.1.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "itoa" @@ -377,7 +360,7 @@ dependencies = [ [[package]] name = "lzw" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -474,6 +457,17 @@ dependencies = [ "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "num-derive" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "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.14.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-integer" version = "0.1.39" @@ -502,6 +496,15 @@ dependencies = [ "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "num-rational" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-traits" version = "0.1.43" @@ -587,13 +590,12 @@ dependencies = [ [[package]] name = "png" -version = "0.4.3" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", - "inflate 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "deflate 0.7.19 (registry+https://github.com/rust-lang/crates.io-index)", + "inflate 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -602,6 +604,22 @@ name = "podio" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "proc-macro2" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quote" +version = "0.6.8" +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)", +] + [[package]] name = "rand" version = "0.3.22" @@ -670,6 +688,11 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "scoped_threadpool" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "scopeguard" version = "0.3.3" @@ -734,7 +757,7 @@ dependencies = [ "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", "flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "image 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", @@ -778,6 +801,16 @@ version = "0.1.0" name = "steven_shared" version = "0.0.1" +[[package]] +name = "syn" +version = "0.14.9" +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)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tempdir" version = "0.3.7" @@ -787,6 +820,17 @@ dependencies = [ "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tiff" +version = "0.2.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)", + "lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "time" version = "0.1.40" @@ -836,6 +880,11 @@ name = "unicode-normalization" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "url" version = "0.5.10" @@ -942,11 +991,9 @@ dependencies = [ [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" -"checksum bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "32866f4d103c4e438b1db1158aa1b1a80ee078e5d77a59a2f906fd62a577389c" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" -"checksum byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96c8b41881888cc08af32d47ac4edd52bc7fa27fef774be47a92443756451304" "checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" "checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" "checksum bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5162604199bbb17690ede847eaa6120a3f33d5ab4dcc8e7c25b16d849ae79b" @@ -960,23 +1007,21 @@ dependencies = [ "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" +"checksum deflate 0.7.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8a6abb26e16e8d419b5c78662aa9f82857c2386a073da266840e474d5055ec86" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" -"checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" -"checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423" "checksum flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "37847f133aae7acf82bb9577ccd8bda241df836787642654286e79679826a54b" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" -"checksum gif 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45403dbb4c5208d0e0f46e663e9df19abb84f1ab2ec8c5a830eafea41ad10df3" +"checksum gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c" "checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" -"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb0f4d00bb781e559b6e66ae4b5479df0fdf9ab15949f52fa2f1f5de16d4cc07" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum image 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "439bfcbcf8a0ef6064c53d4d4c03e5df549415c2088e381ef0d7c8225c47bd1a" -"checksum inflate 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7e0062d2dc2f17d2f13750d95316ae8a2ff909af0fda957084f5defd87c43bb" +"checksum image 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60710fd3cb40c2434451d8d5147bcf39bbb68aae0741041133e09439cb2401e3" +"checksum inflate 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6f53b811ee8e2057ccf9643ca6b4277de90efaf5e61e55fd5254576926bb4245" "checksum itoa 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae3088ea4baeceb0284ee9eea42f591226e6beaecf65373e41b38d95a1b8e7a1" "checksum jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b7d43206b34b3f94ea9445174bda196e772049b9bddbc620c9d29b2d20110d" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" @@ -990,7 +1035,7 @@ dependencies = [ "checksum libressl-pnacl-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "cbc058951ab6a3ef35ca16462d7642c4867e6403520811f28537a4e2f2db3e71" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" -"checksum lzw 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cba82344432e19bcb98fa21c5a6e78f42a06252b4744e2e9162ae98b3a01ee92" +"checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" @@ -1002,9 +1047,11 @@ dependencies = [ "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" "checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" "checksum num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "b288631d7878aaf59442cffd36910ea604ecd7745c36054328595114001c9656" +"checksum num-derive 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d2c31b75c36a993d30c7a13d70513cb93f02acafdd5b7ba250f9b0e18615de7" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" "checksum num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" +"checksum num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e96f040177bb3da242b5b1ecf3f54b5d5af3efbbfb18608977a5d2767b22f10" "checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3" @@ -1015,8 +1062,10 @@ dependencies = [ "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum pnacl-build-helper 1.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dfbe13ee77c06fb633d71c72438bd983286bb3521863a753ade8e951c7efb090" -"checksum png 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "668644d06046819b75098c990e291c4cbadb4a2d1b2424211bf1321005ec764a" +"checksum png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f54b9600d584d3b8a739e1662a595fab051329eff43f20e7d8cc22872962145b" "checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" +"checksum proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "ffe022fb8c8bd254524b0b3305906c1921fa37a84a644e29079a9e62200c3901" +"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" "checksum rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "df7a791f788cb4c516f0e091301a29c2b71ef680db5e644a7d68835c8ae6dbfa" @@ -1025,6 +1074,7 @@ dependencies = [ "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" +"checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a74c2a98a354b20713b90cce70aef9e927e46110d1bc4ef728fd74e0d53eba60" "checksum sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c543ce8a6e33a30cb909612eeeb22e693848211a84558d5a00bb11e791b7ab7" @@ -1032,7 +1082,9 @@ dependencies = [ "checksum serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b22e8a0554f31cb0f501e027de07b253553b308124f61c57598b9678dba35c0b" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" +"checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +"checksum tiff 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a2cc6c4fd13cb1cfd20abdb196e794ceccb29371855b7e7f575945f920a5b3c2" "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" "checksum traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "07eaeb7689bb7fca7ce15628319635758eda769fed481ecfe6686ddef2600616" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" @@ -1040,6 +1092,7 @@ dependencies = [ "checksum unicode-bidi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "149319afc0ec718611d4a9208c0308e3b1b62dcfbd982e5e723f6ec35b909b92" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" +"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum url 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4a3440c1ed62af4a2aee71c6fb78ef32ddcb75cfa24bf42f45e07c02b6d6a2f6" "checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" "checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" diff --git a/Cargo.toml b/Cargo.toml index 4f60d82d..b6e82d18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ serde = "0.7.0" serde_json = "0.7.0" flate2 = "1.0.2" zip = "0.4.2" -image = "0.7.0" +image = "0.20.0" rand = "0.3.14" rustc-serialize = "0.3.24" log = "0.4.5" diff --git a/src/model/mod.rs b/src/model/mod.rs index 7f244f54..01b055ba 100644 --- a/src/model/mod.rs +++ b/src/model/mod.rs @@ -17,7 +17,7 @@ use std::hash::BuildHasherDefault; use types::hash::FNVHash; use rand::Rng; -use image::{self, GenericImage}; +use image::GenericImageView; pub struct Factory { resources: Arc>, diff --git a/src/render/mod.rs b/src/render/mod.rs index 1eb9b5e7..fe71b805 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -26,7 +26,7 @@ use std::io::Write; use resources; use gl; use image; -use image::GenericImage; +use image::{GenericImage, GenericImageView}; use byteorder::{WriteBytesExt, NativeEndian}; use serde_json; use cgmath::{self, Vector, Point, SquareMatrix}; diff --git a/src/render/ui.rs b/src/render/ui.rs index feaad363..eb7b5fd2 100644 --- a/src/render/ui.rs +++ b/src/render/ui.rs @@ -21,7 +21,7 @@ use render::glsl; use render::shaders; use byteorder::{WriteBytesExt, NativeEndian}; use image; -use image::GenericImage; +use image::GenericImageView; const UI_WIDTH: f64 = 854.0; const UI_HEIGHT: f64 = 480.0; From e988c643763e6aee06505004a7e8b3ad26d40414 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 17:58:40 -0700 Subject: [PATCH 23/45] Use base64 crate for base64 instead of deprecated rustc-serialize, for https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 17 +++++++++++++++++ Cargo.toml | 1 + src/main.rs | 1 + src/screen/server_list.rs | 7 +++---- src/server/mod.rs | 5 +++-- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 723ef0a5..02e71e91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,6 +11,15 @@ dependencies = [ "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "base64" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bitflags" version = "0.7.0" @@ -679,6 +688,11 @@ name = "rustc-serialize" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "safemem" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "same-file" version = "0.1.3" @@ -752,6 +766,7 @@ dependencies = [ name = "steven" version = "0.0.1" dependencies = [ + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", @@ -991,6 +1006,7 @@ dependencies = [ [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" +"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" @@ -1073,6 +1089,7 @@ dependencies = [ "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" "checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" diff --git a/Cargo.toml b/Cargo.toml index b6e82d18..2cda4d62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ zip = "0.4.2" image = "0.20.0" rand = "0.3.14" rustc-serialize = "0.3.24" +base64 = "0.9.3" log = "0.4.5" cgmath = "0.7.0" lazy_static = "1.1.0" diff --git a/src/main.rs b/src/main.rs index 3812d95a..8512f69d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,6 +27,7 @@ extern crate hyper; extern crate flate2; extern crate rand; extern crate rustc_serialize; +extern crate base64; extern crate cgmath; #[macro_use] extern crate log; diff --git a/src/screen/server_list.rs b/src/screen/server_list.rs index 5a7579cd..a356caf7 100644 --- a/src/screen/server_list.rs +++ b/src/screen/server_list.rs @@ -27,7 +27,7 @@ use protocol; use serde_json; use std::time::{Duration}; use image; -use rustc_serialize::base64::FromBase64; +use base64; use rand; use rand::Rng; @@ -264,9 +264,8 @@ impl ServerList { let mut desc = res.0.description; format::convert_legacy(&mut desc); let favicon = if let Some(icon) = res.0.favicon { - let data = icon["data:image/png;base64,".len()..] - .from_base64() - .unwrap(); + let data_base64 = &icon["data:image/png;base64,".len()..]; + let data = base64::decode_config(data_base64, base64::MIME).unwrap(); Some(image::load_from_memory(&data).unwrap()) } else { None diff --git a/src/server/mod.rs b/src/server/mod.rs index 14a62333..86716a7c 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -736,7 +736,7 @@ impl Server { fn on_player_info(&mut self, player_info: packet::play::clientbound::PlayerInfo) { use protocol::packet::PlayerDetail::*; - use rustc_serialize::base64::FromBase64; + use base64; use serde_json; for detail in player_info.inner.players { match detail { @@ -765,7 +765,8 @@ impl Server { // authlib. We could download authlib on startup and extract // the key but this seems like overkill compared to just // whitelisting Mojang's texture servers instead. - let skin_blob = match prop.value.from_base64() { + let skin_blob_result = &base64::decode_config(&prop.value, base64::MIME); + let skin_blob = match skin_blob_result { Ok(val) => val, Err(err) => { error!("Failed to decode skin blob, {:?}", err); From c688836a16e276964f258d0031a987ff7600b7b0 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 18:14:36 -0700 Subject: [PATCH 24/45] Use hex module for hex decoding, removing deprecated rustc-serialize for https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 8 +++++++- Cargo.toml | 2 +- src/main.rs | 2 +- src/protocol/mod.rs | 12 ++++++------ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 02e71e91..272e88b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,6 +213,11 @@ dependencies = [ "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hex" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "hpack" version = "0.2.0" @@ -771,13 +776,13 @@ dependencies = [ "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", "flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1032,6 +1037,7 @@ dependencies = [ "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" "checksum gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c" "checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" +"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" "checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb0f4d00bb781e559b6e66ae4b5479df0fdf9ab15949f52fa2f1f5de16d4cc07" diff --git a/Cargo.toml b/Cargo.toml index 2cda4d62..d4283c23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ flate2 = "1.0.2" zip = "0.4.2" image = "0.20.0" rand = "0.3.14" -rustc-serialize = "0.3.24" +hex = "0.3.2" base64 = "0.9.3" log = "0.4.5" cgmath = "0.7.0" diff --git a/src/main.rs b/src/main.rs index 8512f69d..b0388602 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,7 @@ extern crate sha1; extern crate hyper; extern crate flate2; extern crate rand; -extern crate rustc_serialize; +extern crate hex; extern crate base64; extern crate cgmath; #[macro_use] diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 2ae6e3f0..6625da4a 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -350,16 +350,16 @@ pub struct UUID(u64, u64); impl UUID { pub fn from_str(s: &str) -> UUID { - use rustc_serialize::hex::FromHex; + use hex; // TODO: Panics aren't the best idea here if s.len() != 36 { panic!("Invalid UUID format"); } - let mut parts = s[..8].from_hex().unwrap(); - parts.extend_from_slice(&s[9..13].from_hex().unwrap()); - parts.extend_from_slice(&s[14..18].from_hex().unwrap()); - parts.extend_from_slice(&s[19..23].from_hex().unwrap()); - parts.extend_from_slice(&s[24..36].from_hex().unwrap()); + let mut parts = hex::decode(&s[..8]).unwrap(); + parts.extend_from_slice(&hex::decode(&s[9..13]).unwrap()); + parts.extend_from_slice(&hex::decode(&s[14..18]).unwrap()); + parts.extend_from_slice(&hex::decode(&s[19..23]).unwrap()); + parts.extend_from_slice(&hex::decode(&s[24..36]).unwrap()); let mut high = 0u64; let mut low = 0u64; for i in 0 .. 8 { From d2b59fbd102376966ce1cdc33f14a88e8703a7ab Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 19:05:20 -0700 Subject: [PATCH 25/45] Update to rand 0.5.5 for https://github.com/iceiix/steven/issues/4 Useful guide: https://github.com/rust-random/rand/blob/master/UPDATING.md --- Cargo.lock | 30 +++++++++++++++++++++++++++++- Cargo.toml | 2 +- src/chunk_builder.rs | 27 +++++++++++++++++++++------ src/screen/login.rs | 5 ++++- src/screen/server_list.rs | 8 ++++---- src/server/mod.rs | 2 +- src/ui/logo.rs | 2 +- 7 files changed, 61 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 272e88b9..06dfd755 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,6 +78,14 @@ dependencies = [ "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "collision" version = "0.5.1" @@ -654,6 +662,23 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rayon" version = "1.0.2" @@ -782,7 +807,7 @@ dependencies = [ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1021,6 +1046,7 @@ dependencies = [ "checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" "checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" "checksum cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75e93b3eb66e74ffb946a69ff54c6026c1399960241c843f249ea0127b96b9f6" +"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)" = "" "checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" "checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626" @@ -1090,6 +1116,8 @@ dependencies = [ "checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" +"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" +"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2" "checksum rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "df7a791f788cb4c516f0e091301a29c2b71ef680db5e644a7d68835c8ae6dbfa" "checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" diff --git a/Cargo.toml b/Cargo.toml index d4283c23..7a71b808 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ serde_json = "0.7.0" flate2 = "1.0.2" zip = "0.4.2" image = "0.20.0" -rand = "0.3.14" +rand = "0.5.5" hex = "0.3.2" base64 = "0.9.3" log = "0.4.5" diff --git a/src/chunk_builder.rs b/src/chunk_builder.rs index e9b62b23..048dabdc 100644 --- a/src/chunk_builder.rs +++ b/src/chunk_builder.rs @@ -109,7 +109,7 @@ struct BuildReply { } fn build_func(id: usize, models: Arc>, work_recv: mpsc::Receiver, built_send: mpsc::Sender<(usize, BuildReply)>) { - use rand::{self, Rng, SeedableRng}; + use rand::{self, SeedableRng, Rng}; loop { let BuildReq { snapshot, @@ -122,10 +122,25 @@ fn build_func(id: usize, models: Arc>, work_recv: mpsc::R }; let mut rng = rand::XorShiftRng::from_seed([ - position.0 as u32, - position.1 as u32, - position.2 as u32, - (position.0 as u32 ^ position.2 as u32) | 1, + ((position.0 as u32) & 0xff) as u8, + (((position.0 as u32) >> 8) & 0xff) as u8, + (((position.0 as u32) >> 16) & 0xff) as u8, + ((position.0 as u32) >> 24) as u8, + + ((position.1 as u32) & 0xff) as u8, + (((position.1 as u32) >> 8) & 0xff) as u8, + (((position.1 as u32) >> 16) & 0xff) as u8, + ((position.1 as u32) >> 24) as u8, + + ((position.2 as u32) & 0xff) as u8, + (((position.2 as u32) >> 8) & 0xff) as u8, + (((position.2 as u32) >> 16) & 0xff) as u8, + ((position.2 as u32) >> 24) as u8, + + (((position.0 as u32 ^ position.2 as u32) | 1) & 0xff) as u8, + ((((position.0 as u32 ^ position.2 as u32) | 1) >> 8) & 0xff) as u8, + ((((position.0 as u32 ^ position.2 as u32) | 1) >> 16) & 0xff) as u8, + (((position.0 as u32 ^ position.2 as u32) | 1) >> 24) as u8, ]); let mut solid_count = 0; @@ -140,7 +155,7 @@ fn build_func(id: usize, models: Arc>, work_recv: mpsc::R // Use one step of the rng so that // if a block is placed in an empty // location is variant doesn't change - rng.next_u32(); + let _: u32 = rng.gen(); continue; } diff --git a/src/screen/login.rs b/src/screen/login.rs index 950783cd..331c3d30 100644 --- a/src/screen/login.rs +++ b/src/screen/login.rs @@ -170,7 +170,10 @@ impl super::Screen for Login { elements.login_btn_text.borrow_mut().text = "Logging in...".into(); let mut client_token = self.vars.get(auth::AUTH_CLIENT_TOKEN).clone(); if client_token.is_empty() { - client_token = rand::thread_rng().gen_ascii_chars().take(20).collect::(); + client_token = std::iter::repeat(()).map(|()| rand::thread_rng() + .sample(&rand::distributions::Alphanumeric)) + .take(20) + .collect(); self.vars.set(auth::AUTH_CLIENT_TOKEN, client_token); } let client_token = self.vars.get(auth::AUTH_CLIENT_TOKEN).clone(); diff --git a/src/screen/server_list.rs b/src/screen/server_list.rs index a356caf7..2c9b7fd7 100644 --- a/src/screen/server_list.rs +++ b/src/screen/server_list.rs @@ -496,10 +496,10 @@ impl super::Screen for ServerList { s.version.borrow_mut().set_text(msg); } if let Some(favicon) = res.favicon { - let name: String = rand::thread_rng() - .gen_ascii_chars() - .take(30) - .collect(); + let name: String = std::iter::repeat(()).map(|()| rand::thread_rng() + .sample(&rand::distributions::Alphanumeric)) + .take(30) + .collect(); let tex = renderer.get_textures_ref(); s.icon_texture = Some(name.clone()); let icon_tex = tex.write() diff --git a/src/server/mod.rs b/src/server/mod.rs index 86716a7c..f89f391b 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -216,7 +216,7 @@ impl Server { } server.world.set_block(Position::new(x, h, z), block::Grass{ snowy: false }); - if x*x + z*z > 16*16 && rng.gen_weighted_bool(80) { + if x*x + z*z > 16*16 && rng.gen_bool(1.0 / 80.0) { for i in 0 .. 5 { server.world.set_block(Position::new(x, h + 1 + i, z), block::Log{ axis: Axis::Y, variant: block::TreeVariant::Oak }); } diff --git a/src/ui/logo.rs b/src/ui/logo.rs index ce24a0ee..fe8cf78d 100644 --- a/src/ui/logo.rs +++ b/src/ui/logo.rs @@ -101,7 +101,7 @@ impl Logo { text_strings.push(line.to_owned().replace("\r", "")); } } - let mut r: rand::XorShiftRng = rand::SeedableRng::from_seed([45, 64, 32, 12]); + let mut r: rand::XorShiftRng = rand::SeedableRng::from_seed([45, 0, 0, 0, 64, 0, 0, 0, 32, 0, 0, 0, 12, 0, 0, 0]); r.shuffle(&mut text_strings[..]); } From 9997174faea501533a57a45b76c488cffd7c5a94 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 30 Sep 2018 19:16:25 -0700 Subject: [PATCH 26/45] Update to serde 1.0.79 for https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 8 +++++++- Cargo.toml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 06dfd755..d6762707 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -768,6 +768,11 @@ name = "serde" version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "serde" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde_json" version = "0.7.4" @@ -809,7 +814,7 @@ dependencies = [ "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "steven_blocks 0.0.1", @@ -1130,6 +1135,7 @@ dependencies = [ "checksum sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a74c2a98a354b20713b90cce70aef9e927e46110d1bc4ef728fd74e0d53eba60" "checksum sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c543ce8a6e33a30cb909612eeeb22e693848211a84558d5a00bb11e791b7ab7" "checksum serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1b0e0732aa8ec4267f61815a396a942ba3525062e3bd5520aa8419927cfc0a92" +"checksum serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "84257ccd054dc351472528c8587b4de2dbf0dc0fe2e634030c1a90bfdacebaa9" "checksum serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b22e8a0554f31cb0f501e027de07b253553b308124f61c57598b9678dba35c0b" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" diff --git a/Cargo.toml b/Cargo.toml index 7a71b808..b127f331 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ sha1 = "0.6.0" sdl2 = "0.31.0" byteorder = "1.2.6" hyper = "0.8.0" -serde = "0.7.0" +serde = "1.0.79" serde_json = "0.7.0" flate2 = "1.0.2" zip = "0.4.2" From 7503b906678d3cb7c8c32901783503c0c5d36505 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Wed, 3 Oct 2018 18:28:05 -0700 Subject: [PATCH 27/45] Use the RustCrypto sha-1 crate instead of sha1 For https://github.com/iceiix/steven/issues/2#issuecomment-425769562 --- Cargo.lock | 77 +++++++++++++++++++++++++++++++++++++++--- Cargo.toml | 2 +- src/protocol/mojang.rs | 12 +++---- 3 files changed, 80 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d6762707..85b33294 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,11 +30,35 @@ name = "bitflags" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "block-buffer" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-padding 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-padding" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byte-tools 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "build_const" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "byte-tools" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" version = "1.2.6" @@ -159,11 +183,24 @@ dependencies = [ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "digest" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "either" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "flate2" version = "1.0.2" @@ -202,6 +239,14 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "generic-array" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "gif" version = "0.10.0" @@ -556,6 +601,11 @@ dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "opaque-debug" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "openssl" version = "0.7.14" @@ -784,9 +834,15 @@ dependencies = [ ] [[package]] -name = "sha1" -version = "0.6.0" +name = "sha-1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "solicit" @@ -816,7 +872,7 @@ dependencies = [ "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "steven_blocks 0.0.1", "steven_gl 0.0.1", "steven_resources 0.1.0", @@ -901,6 +957,11 @@ name = "typeable" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "typenum" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unicase" version = "1.4.2" @@ -1044,7 +1105,10 @@ dependencies = [ "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49665c62e0e700857531fa5d3763e91b539ff1abeebd56808d378b495870d60d" +"checksum block-padding 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc4358306e344bf9775d0197fd00d2603e5afb0771bb353538630f022068ea3" "checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" +"checksum byte-tools 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" "checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" "checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" "checksum bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5162604199bbb17690ede847eaa6120a3f33d5ab4dcc8e7c25b16d849ae79b" @@ -1060,12 +1124,15 @@ dependencies = [ "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum deflate 0.7.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8a6abb26e16e8d419b5c78662aa9f82857c2386a073da266840e474d5055ec86" +"checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" +"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "37847f133aae7acf82bb9577ccd8bda241df836787642654286e79679826a54b" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" +"checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c" "checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" @@ -1109,6 +1176,7 @@ dependencies = [ "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" +"checksum opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" "checksum openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)" = "c4117b6244aac42ed0150a6019b4d953d28247c5dd6ae6f46ae469b5f2318733" "checksum openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)" = "89c47ee94c352eea9ddaf8e364be7f978a3bb6d66d73176572484238dd5a5c3f" "checksum openssl-sys-extras 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)" = "11c5e1dba7d3d03d80f045bf0d60111dc69213b67651e7c889527a3badabb9fa" @@ -1137,7 +1205,7 @@ dependencies = [ "checksum serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1b0e0732aa8ec4267f61815a396a942ba3525062e3bd5520aa8419927cfc0a92" "checksum serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "84257ccd054dc351472528c8587b4de2dbf0dc0fe2e634030c1a90bfdacebaa9" "checksum serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b22e8a0554f31cb0f501e027de07b253553b308124f61c57598b9678dba35c0b" -"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +"checksum sha-1 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfd94fe9ed1245c2a1459f99373217b131a1b32b6d0922988b1e45b35249249" "checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" @@ -1145,6 +1213,7 @@ dependencies = [ "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" "checksum traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "07eaeb7689bb7fca7ce15628319635758eda769fed481ecfe6686ddef2600616" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" +"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicode-bidi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "149319afc0ec718611d4a9208c0308e3b1b62dcfbd982e5e723f6ec35b909b92" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" diff --git a/Cargo.toml b/Cargo.toml index b127f331..3f4e636f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ authors = [ "Thinkofdeath " ] opt-level = 1 [dependencies] -sha1 = "0.6.0" +sha-1 = "0.8.0" sdl2 = "0.31.0" byteorder = "1.2.6" hyper = "0.8.0" diff --git a/src/protocol/mojang.rs b/src/protocol/mojang.rs index edf0a916..f1506b61 100644 --- a/src/protocol/mojang.rs +++ b/src/protocol/mojang.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use sha1; +use sha1::{self, Digest}; use serde_json; use serde_json::builder::ObjectBuilder; use hyper; @@ -101,11 +101,11 @@ impl Profile { } pub fn join_server(&self, server_id: &str, shared_key: &[u8], public_key: &[u8]) -> Result<(), super::Error> { - let mut sha1 = sha1::Sha1::new(); - sha1.update(server_id.as_bytes()); - sha1.update(shared_key); - sha1.update(public_key); - let mut hash = sha1.digest().bytes(); + let mut hasher = sha1::Sha1::new(); + hasher.input(server_id.as_bytes()); + hasher.input(shared_key); + hasher.input(public_key); + let mut hash = hasher.result(); // Mojang uses a hex method which allows for // negatives so we have to account for that. From 3a32710b175e78fc0f00a995a31c3994182b5c2f Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 6 Oct 2018 13:28:19 -0700 Subject: [PATCH 28/45] Check framebuffer status after each bind For https://github.com/iceiix/steven/issues/5 GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT --- src/gl/mod.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/gl/mod.rs b/src/gl/mod.rs index e13d0dab..a973df8f 100644 --- a/src/gl/mod.rs +++ b/src/gl/mod.rs @@ -819,6 +819,31 @@ pub const DEPTH_ATTACHMENT: Attachment = gl::DEPTH_ATTACHMENT; pub struct Framebuffer(u32); +unsafe fn check_framebuffer_status() { + let status = gl::CheckFramebufferStatus(gl::FRAMEBUFFER); + let s = + match status { + gl::FRAMEBUFFER_UNDEFINED => "GL_FRAMEBUFFER_UNDEFINED", + gl::FRAMEBUFFER_INCOMPLETE_ATTACHMENT => "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", + gl::FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT => "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", + gl::FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER => "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER", + gl::FRAMEBUFFER_INCOMPLETE_READ_BUFFER => "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER", + gl::FRAMEBUFFER_UNSUPPORTED => "GL_FRAMEBUFFER_UNSUPPORTED", + gl::FRAMEBUFFER_INCOMPLETE_MULTISAMPLE => "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE", + gl::FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS => "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS", + + gl::FRAMEBUFFER_COMPLETE => "GL_FRAMEBUFFER_COMPLETE", + //gl::FRAMEBUFFER_INCOMPLETE_DIMENSIONS => "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS", + _ => "unknown" + }; + + if status != gl::FRAMEBUFFER_COMPLETE { + println!("glBindFramebuffer failed, glCheckFrameBufferStatus(GL_FRAMEBUFFER) = {} {}", status, s); + //panic!("glBindFramebuffer failed, glCheckFrameBufferStatus(GL_FRAMEBUFFER) = {} {}", status, s); + } + +} + impl Framebuffer { pub fn new() -> Framebuffer { let mut fb = Framebuffer(0); @@ -831,18 +856,21 @@ impl Framebuffer { pub fn bind(&self) { unsafe { gl::BindFramebuffer(gl::FRAMEBUFFER, self.0); + check_framebuffer_status(); } } pub fn bind_read(&self) { unsafe { gl::BindFramebuffer(gl::READ_FRAMEBUFFER, self.0); + check_framebuffer_status(); } } pub fn bind_draw(&self) { unsafe { gl::BindFramebuffer(gl::DRAW_FRAMEBUFFER, self.0); + check_framebuffer_status(); } } From 84c682b17781095f3ff5612479ec04cddf53b616 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 6 Oct 2018 13:58:16 -0700 Subject: [PATCH 29/45] Check framebuffer status later not immediately after binding No errors https://github.com/iceiix/steven/issues/5 --- src/gl/mod.rs | 46 ++++++++++++++++++++++------------------------ src/render/mod.rs | 3 ++- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/gl/mod.rs b/src/gl/mod.rs index a973df8f..85625a48 100644 --- a/src/gl/mod.rs +++ b/src/gl/mod.rs @@ -819,29 +819,30 @@ pub const DEPTH_ATTACHMENT: Attachment = gl::DEPTH_ATTACHMENT; pub struct Framebuffer(u32); -unsafe fn check_framebuffer_status() { - let status = gl::CheckFramebufferStatus(gl::FRAMEBUFFER); - let s = - match status { - gl::FRAMEBUFFER_UNDEFINED => "GL_FRAMEBUFFER_UNDEFINED", - gl::FRAMEBUFFER_INCOMPLETE_ATTACHMENT => "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", - gl::FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT => "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", - gl::FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER => "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER", - gl::FRAMEBUFFER_INCOMPLETE_READ_BUFFER => "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER", - gl::FRAMEBUFFER_UNSUPPORTED => "GL_FRAMEBUFFER_UNSUPPORTED", - gl::FRAMEBUFFER_INCOMPLETE_MULTISAMPLE => "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE", - gl::FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS => "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS", - - gl::FRAMEBUFFER_COMPLETE => "GL_FRAMEBUFFER_COMPLETE", - //gl::FRAMEBUFFER_INCOMPLETE_DIMENSIONS => "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS", - _ => "unknown" - }; +pub fn check_framebuffer_status() { + unsafe { + let status = gl::CheckFramebufferStatus(gl::FRAMEBUFFER); + let s = + match status { + gl::FRAMEBUFFER_UNDEFINED => "GL_FRAMEBUFFER_UNDEFINED", + gl::FRAMEBUFFER_INCOMPLETE_ATTACHMENT => "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", + gl::FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT => "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", + gl::FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER => "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER", + gl::FRAMEBUFFER_INCOMPLETE_READ_BUFFER => "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER", + gl::FRAMEBUFFER_UNSUPPORTED => "GL_FRAMEBUFFER_UNSUPPORTED", + gl::FRAMEBUFFER_INCOMPLETE_MULTISAMPLE => "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE", + gl::FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS => "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS", + + gl::FRAMEBUFFER_COMPLETE => "GL_FRAMEBUFFER_COMPLETE", + //gl::FRAMEBUFFER_INCOMPLETE_DIMENSIONS => "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS", + _ => "unknown" + }; - if status != gl::FRAMEBUFFER_COMPLETE { - println!("glBindFramebuffer failed, glCheckFrameBufferStatus(GL_FRAMEBUFFER) = {} {}", status, s); - //panic!("glBindFramebuffer failed, glCheckFrameBufferStatus(GL_FRAMEBUFFER) = {} {}", status, s); + if status != gl::FRAMEBUFFER_COMPLETE { + println!("glBindFramebuffer failed, glCheckFrameBufferStatus(GL_FRAMEBUFFER) = {} {}", status, s); + //panic!("glBindFramebuffer failed, glCheckFrameBufferStatus(GL_FRAMEBUFFER) = {} {}", status, s); + } } - } impl Framebuffer { @@ -856,21 +857,18 @@ impl Framebuffer { pub fn bind(&self) { unsafe { gl::BindFramebuffer(gl::FRAMEBUFFER, self.0); - check_framebuffer_status(); } } pub fn bind_read(&self) { unsafe { gl::BindFramebuffer(gl::READ_FRAMEBUFFER, self.0); - check_framebuffer_status(); } } pub fn bind_draw(&self) { unsafe { gl::BindFramebuffer(gl::DRAW_FRAMEBUFFER, self.0); - check_framebuffer_status(); } } diff --git a/src/render/mod.rs b/src/render/mod.rs index fe71b805..66e316d7 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -705,7 +705,7 @@ impl TransInfo { gl::bind_frag_data_location(&chunk_shader.program, 0, "accum"); gl::bind_frag_data_location(&chunk_shader.program, 1, "revealage"); gl::draw_buffers(&[gl::COLOR_ATTACHMENT_0, gl::COLOR_ATTACHMENT_1]); - + gl::check_framebuffer_status(); let main = gl::Framebuffer::new(); main.bind(); @@ -719,6 +719,7 @@ impl TransInfo { fb_depth.bind(gl::TEXTURE_2D_MULTISAMPLE); fb_depth.image_2d_sample(gl::TEXTURE_2D_MULTISAMPLE, NUM_SAMPLES, width, height, gl::DEPTH_COMPONENT24, false); main.texture_2d(gl::DEPTH_ATTACHMENT, gl::TEXTURE_2D_MULTISAMPLE, &fb_depth, 0); + gl::check_framebuffer_status(); gl::unbind_framebuffer(); From 7731117e4fdecb96c8b5767a28d97214b5928f61 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 7 Oct 2018 08:00:07 -0700 Subject: [PATCH 30/45] Check framebuffer statuses before rendering and unbinding No errors, so not the cause of https://github.com/iceiix/steven/issues/5 --- src/render/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/render/mod.rs b/src/render/mod.rs index 66e316d7..fcd97e19 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -365,6 +365,7 @@ impl Renderer { } } + gl::check_framebuffer_status(); gl::unbind_framebuffer(); gl::disable(gl::DEPTH_TEST); gl::clear(gl::ClearFlags::Color); @@ -704,8 +705,8 @@ impl TransInfo { chunk_shader.program.use_program(); gl::bind_frag_data_location(&chunk_shader.program, 0, "accum"); gl::bind_frag_data_location(&chunk_shader.program, 1, "revealage"); - gl::draw_buffers(&[gl::COLOR_ATTACHMENT_0, gl::COLOR_ATTACHMENT_1]); gl::check_framebuffer_status(); + gl::draw_buffers(&[gl::COLOR_ATTACHMENT_0, gl::COLOR_ATTACHMENT_1]); let main = gl::Framebuffer::new(); main.bind(); From cceb1768b14a8ac895b3fa90b45df8078b4e2418 Mon Sep 17 00:00:00 2001 From: iceiix Date: Sun, 7 Oct 2018 09:43:00 -0700 Subject: [PATCH 31/45] Panic on incomplete framebuffer so can see where it was called with RUST_BACKTRACE=1 --- src/gl/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/mod.rs b/src/gl/mod.rs index 85625a48..14a92062 100644 --- a/src/gl/mod.rs +++ b/src/gl/mod.rs @@ -840,7 +840,7 @@ pub fn check_framebuffer_status() { if status != gl::FRAMEBUFFER_COMPLETE { println!("glBindFramebuffer failed, glCheckFrameBufferStatus(GL_FRAMEBUFFER) = {} {}", status, s); - //panic!("glBindFramebuffer failed, glCheckFrameBufferStatus(GL_FRAMEBUFFER) = {} {}", status, s); + panic!("glBindFramebuffer failed, glCheckFrameBufferStatus(GL_FRAMEBUFFER) = {} {}", status, s); } } } From ed5d48f136c216e5de04264fc2e1f928109bf9f4 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 7 Oct 2018 10:08:24 -0700 Subject: [PATCH 32/45] Clamp NUM_SAMPLES glTexImage2DMultisample at GL_MAX_SAMPLES, since not all systems support >1 see https://github.com/iceiix/steven/issues/5#issuecomment-427669426 --- src/gl/mod.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gl/mod.rs b/src/gl/mod.rs index 14a92062..b2e95d98 100644 --- a/src/gl/mod.rs +++ b/src/gl/mod.rs @@ -370,8 +370,18 @@ impl Texture { format: TextureFormat, fixed: bool) { unsafe { + let result: &mut [i32] = &mut [0; 1]; + gl::GetIntegerv(gl::MAX_SAMPLES, &mut result[0]); + let use_samples = + if samples > result[0] { + println!("glTexImage2DMultisample: requested {} samples but GL_MAX_SAMPLES is {}", samples, result[0]); + result[0] + } else { + samples + }; + gl::TexImage2DMultisample(target, - samples, + use_samples, format, width as i32, height as i32, From edbed5e31979ba5d6b513ab045645bccde0e69c5 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 7 Oct 2018 13:53:50 -0700 Subject: [PATCH 33/45] Check glGetError() in rendering loop For investigating https://github.com/iceiix/steven/issues/5 No errors seen --- src/gl/mod.rs | 13 +++++++++++++ src/render/mod.rs | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/gl/mod.rs b/src/gl/mod.rs index b2e95d98..eaf02b1a 100644 --- a/src/gl/mod.rs +++ b/src/gl/mod.rs @@ -855,6 +855,19 @@ pub fn check_framebuffer_status() { } } +pub fn check_gl_error() { + unsafe { + loop { + let err = gl::GetError(); + if err == gl::NO_ERROR { + break + } + + println!("glGetError = {}", err); + } + } +} + impl Framebuffer { pub fn new() -> Framebuffer { let mut fb = Framebuffer(0); diff --git a/src/render/mod.rs b/src/render/mod.rs index fcd97e19..b3800727 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -379,6 +379,8 @@ impl Renderer { self.ui.tick(width, height); + gl::check_gl_error(); + self.frame_id = self.frame_id.wrapping_add(1); } From de6cd2044edfb22a122ee91dc2dd7d6f691d15fc Mon Sep 17 00:00:00 2001 From: iceiix <43691553+iceiix@users.noreply.github.com> Date: Tue, 23 Oct 2018 18:47:21 -0700 Subject: [PATCH 34/45] Update to serde_json 1.0 (#6) * Replace find() with get() * Update for renamed as_string->as_str and as_boolean->as_bool https://github.com/serde-rs/json/releases/tag/v0.8.0 Value::as_string() has been renamed to as_str() and Value::as_boolean() has been renamed to as_bool() to improve consistency https://github.com/serde-rs/json/issues/126 * No serde_json::Value::I64/U64/F64 anymore, only Number * Update from lookup() to pointer(), using JSON pointer syntax https://github.com/iceiix/steven/pull/6#issuecomment-432472123 * Remove unused and removed ObjectBuilder import * Use into_iter().collect() to convert BTreeMap to serde_json::Map * Change parse_rules to accept serde_json::Map instead of BTreeMap * Remove unused serde_json macro_use * Update Cargo.lock --- Cargo.lock | 37 ++++++++------------- Cargo.toml | 2 +- src/format.rs | 22 ++++++------- src/main.rs | 1 + src/model/mod.rs | 68 +++++++++++++++++++-------------------- src/nbt/mod.rs | 2 +- src/protocol/mod.rs | 16 ++++----- src/protocol/mojang.rs | 56 ++++++++++++++++---------------- src/render/mod.rs | 14 ++++---- src/resources.rs | 10 +++--- src/screen/edit_server.rs | 4 +-- src/screen/server_list.rs | 6 ++-- src/server/mod.rs | 12 +++---- 13 files changed, 119 insertions(+), 131 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 85b33294..7628a47f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "itoa" -version = "0.1.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -572,14 +572,6 @@ dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "num-traits" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "num-traits" version = "0.2.6" @@ -768,6 +760,11 @@ name = "rustc-serialize" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "ryu" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "safemem" version = "0.3.0" @@ -813,11 +810,6 @@ dependencies = [ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "serde" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "serde" version = "1.0.79" @@ -825,12 +817,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_json" -version = "0.7.4" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "itoa 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -871,7 +863,7 @@ dependencies = [ "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", "sha-1 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "steven_blocks 0.0.1", "steven_gl 0.0.1", @@ -1142,7 +1134,7 @@ dependencies = [ "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum image 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60710fd3cb40c2434451d8d5147bcf39bbb68aae0741041133e09439cb2401e3" "checksum inflate 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6f53b811ee8e2057ccf9643ca6b4277de90efaf5e61e55fd5254576926bb4245" -"checksum itoa 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae3088ea4baeceb0284ee9eea42f591226e6beaecf65373e41b38d95a1b8e7a1" +"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b7d43206b34b3f94ea9445174bda196e772049b9bddbc620c9d29b2d20110d" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d5a08e2a31d665af8f1ca437eab6d00a93c9d62a549f73f9ed8fc2e55b5a91a7" @@ -1172,7 +1164,6 @@ dependencies = [ "checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" "checksum num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" "checksum num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e96f040177bb3da242b5b1ecf3f54b5d5af3efbbfb18608977a5d2767b22f10" -"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" @@ -1196,15 +1187,15 @@ dependencies = [ "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +"checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" "checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a74c2a98a354b20713b90cce70aef9e927e46110d1bc4ef728fd74e0d53eba60" "checksum sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c543ce8a6e33a30cb909612eeeb22e693848211a84558d5a00bb11e791b7ab7" -"checksum serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1b0e0732aa8ec4267f61815a396a942ba3525062e3bd5520aa8419927cfc0a92" "checksum serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "84257ccd054dc351472528c8587b4de2dbf0dc0fe2e634030c1a90bfdacebaa9" -"checksum serde_json 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b22e8a0554f31cb0f501e027de07b253553b308124f61c57598b9678dba35c0b" +"checksum serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce" "checksum sha-1 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfd94fe9ed1245c2a1459f99373217b131a1b32b6d0922988b1e45b35249249" "checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" diff --git a/Cargo.toml b/Cargo.toml index 3f4e636f..685c8983 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ sdl2 = "0.31.0" byteorder = "1.2.6" hyper = "0.8.0" serde = "1.0.79" -serde_json = "0.7.0" +serde_json = "1.0.31" flate2 = "1.0.2" zip = "0.4.2" image = "0.20.0" diff --git a/src/format.rs b/src/format.rs index e75f3ec8..9eb6ceb9 100644 --- a/src/format.rs +++ b/src/format.rs @@ -38,12 +38,12 @@ impl Component { pub fn from_value(v: &serde_json::Value) -> Self { let mut modifier = Modifier::from_value(v); - if let Some(val) = v.as_string() { + if let Some(val) = v.as_str() { Component::Text(TextComponent { text: val.to_owned(), modifier: modifier, }) - } else if v.find("text").is_some() { + } else if v.get("text").is_some() { Component::Text(TextComponent::from_value(v, modifier)) } else { modifier.color = Some(Color::RGB(255, 0, 0)); @@ -92,17 +92,17 @@ pub struct Modifier { impl Modifier { pub fn from_value(v: &serde_json::Value) -> Self { let mut m = Modifier { - bold: v.find("bold").map_or(Option::None, |v| v.as_boolean()), - italic: v.find("italic").map_or(Option::None, |v| v.as_boolean()), - underlined: v.find("underlined").map_or(Option::None, |v| v.as_boolean()), - strikethrough: v.find("strikethrough").map_or(Option::None, |v| v.as_boolean()), - obfuscated: v.find("obfuscated").map_or(Option::None, |v| v.as_boolean()), - color: v.find("color") - .map_or(Option::None, |v| v.as_string()) + bold: v.get("bold").map_or(Option::None, |v| v.as_bool()), + italic: v.get("italic").map_or(Option::None, |v| v.as_bool()), + underlined: v.get("underlined").map_or(Option::None, |v| v.as_bool()), + strikethrough: v.get("strikethrough").map_or(Option::None, |v| v.as_bool()), + obfuscated: v.get("obfuscated").map_or(Option::None, |v| v.as_bool()), + color: v.get("color") + .map_or(Option::None, |v| v.as_str()) .map(|v| Color::from_string(&v.to_owned())), extra: Option::None, }; - if let Some(extra) = v.find("extra") { + if let Some(extra) = v.get("extra") { if let Some(data) = extra.as_array() { let mut ex = Vec::new(); for e in data { @@ -135,7 +135,7 @@ impl TextComponent { pub fn from_value(v: &serde_json::Value, modifier: Modifier) -> Self { TextComponent { - text: v.find("text").unwrap().as_string().unwrap_or("").to_owned(), + text: v.get("text").unwrap().as_str().unwrap_or("").to_owned(), modifier: modifier, } } diff --git a/src/main.rs b/src/main.rs index b0388602..5a9699ec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,6 +20,7 @@ extern crate zip; extern crate image; use std::time::{Instant, Duration}; extern crate byteorder; +#[macro_use] extern crate serde_json; extern crate openssl; extern crate sha1; diff --git a/src/model/mod.rs b/src/model/mod.rs index 01b055ba..6b3c5978 100644 --- a/src/model/mod.rs +++ b/src/model/mod.rs @@ -200,7 +200,7 @@ impl Factory { multipart: vec![], }; - if let Some(variants) = mdl.find("variants").and_then(|v| v.as_object()) { + if let Some(variants) = mdl.get("variants").and_then(|v| v.as_object()) { for (k, v) in variants { let vars = self.parse_model_list(plugin, v); if vars.models.is_empty() { @@ -209,11 +209,11 @@ impl Factory { model.variants.insert(k.clone(), vars); } } - if let Some(multipart) = mdl.find("multipart").and_then(|v| v.as_array()) { + if let Some(multipart) = mdl.get("multipart").and_then(|v| v.as_array()) { for rule in multipart { - let apply = self.parse_model_list(plugin, rule.find("apply").unwrap()); + let apply = self.parse_model_list(plugin, rule.get("apply").unwrap()); let mut rules = vec![]; - if let Some(when) = rule.find("when").and_then(|v| v.as_object()) { + if let Some(when) = rule.get("when").and_then(|v| v.as_object()) { Self::parse_rules(when, &mut rules); } model.multipart.push(MultipartRule { @@ -227,7 +227,7 @@ impl Factory { true } - fn parse_rules(when: &::std::collections::BTreeMap, rules: &mut Vec) { + fn parse_rules(when: &serde_json::Map, rules: &mut Vec) { for (name, val) in when { if name == "OR" { let mut or_rules = vec![]; @@ -239,10 +239,8 @@ impl Factory { rules.push(Rule::Or(or_rules)); } else { let v = match *val { - serde_json::Value::Bool(v) => v.to_string(), - serde_json::Value::I64(v) => v.to_string(), - serde_json::Value::U64(v) => v.to_string(), - serde_json::Value::F64(v) => v.to_string(), + serde_json::Value::Bool(ref v) => v.to_string(), + serde_json::Value::Number(ref v) => v.to_string(), serde_json::Value::String(ref v) => v.to_owned(), _ => unreachable!(), }; @@ -268,7 +266,7 @@ impl Factory { } fn parse_block_state_variant(&self, plugin: &str, v: &serde_json::Value) -> Option { - let model_name = match v.find("model").and_then(|v| v.as_string()) { + let model_name = match v.get("model").and_then(|v| v.as_str()) { Some(val) => val, None => { error!("Couldn't find model name"); @@ -293,15 +291,15 @@ impl Factory { }, }; - model.y = v.find("y").and_then(|v| v.as_f64()).unwrap_or(0.0); - model.x = v.find("x").and_then(|v| v.as_f64()).unwrap_or(0.0); - model.uvlock = v.find("uvlock").and_then(|v| v.as_boolean()).unwrap_or(false); - model.weight = v.find("weight").and_then(|v| v.as_f64()).unwrap_or(1.0); + model.y = v.get("y").and_then(|v| v.as_f64()).unwrap_or(0.0); + model.x = v.get("x").and_then(|v| v.as_f64()).unwrap_or(0.0); + model.uvlock = v.get("uvlock").and_then(|v| v.as_bool()).unwrap_or(false); + model.weight = v.get("weight").and_then(|v| v.as_f64()).unwrap_or(1.0); Some(model) } fn parse_model(&self, plugin: &str, v: &serde_json::Value) -> Option { - let parent = v.find("parent").and_then(|v| v.as_string()).unwrap_or(""); + let parent = v.get("parent").and_then(|v| v.as_str()).unwrap_or(""); let mut model = if !parent.is_empty() && !parent.starts_with("builtin/") { let file = match self.resources.read().unwrap().open(plugin, &format!("models/{}.json", parent)) { Some(val) => val, @@ -341,20 +339,20 @@ impl Factory { } }; - if let Some(textures) = v.find("textures").and_then(|v| v.as_object()) { + if let Some(textures) = v.get("textures").and_then(|v| v.as_object()) { for (k, v) in textures { - model.texture_vars.insert(k.clone(), v.as_string().unwrap_or("").to_owned()); + model.texture_vars.insert(k.clone(), v.as_str().unwrap_or("").to_owned()); } } - if let Some(ao) = v.find("ambientocclusion").and_then(|v| v.as_boolean()) { + if let Some(ao) = v.get("ambientocclusion").and_then(|v| v.as_bool()) { model.ambient_occlusion = ao; model.ao_set = true; } else if !model.ao_set { model.ambient_occlusion = true; } - if let Some(elements) = v.find("elements").and_then(|v| v.as_array()) { + if let Some(elements) = v.get("elements").and_then(|v| v.as_array()) { for e in elements { model.elements.push(self.parse_block_element(e)); } @@ -367,25 +365,25 @@ impl Factory { fn parse_block_element(&self, v: &serde_json::Value) -> ModelElement { let mut element = ModelElement { - from: v.find("from").and_then(|v| v.as_array()).map(|v| [ + from: v.get("from").and_then(|v| v.as_array()).map(|v| [ v[0].as_f64().unwrap(), v[1].as_f64().unwrap(), v[2].as_f64().unwrap() ]).unwrap(), - to: v.find("to").and_then(|v| v.as_array()).map(|v| [ + to: v.get("to").and_then(|v| v.as_array()).map(|v| [ v[0].as_f64().unwrap(), v[1].as_f64().unwrap(), v[2].as_f64().unwrap() ]).unwrap(), - shade: v.find("shade").and_then(|v| v.as_boolean()).unwrap_or(false), + shade: v.get("shade").and_then(|v| v.as_bool()).unwrap_or(false), faces: [None, None, None, None, None, None], rotation: None, }; - if let Some(faces) = v.find("faces").and_then(|v| v.as_object()) { + if let Some(faces) = v.get("faces").and_then(|v| v.as_object()) { for dir in Direction::all() { if let Some(face) = faces.get(dir.as_string()) { element.faces[dir.index()] = Some(BlockFace { - uv: face.find("uv").and_then(|v| v.as_array()).map_or_else( + uv: face.get("uv").and_then(|v| v.as_array()).map_or_else( || { let mut uv = [0.0, 0.0, 16.0, 16.0]; match dir { @@ -418,22 +416,22 @@ impl Factory { v[3].as_f64().unwrap() ] ), - texture: face.find("texture") - .and_then(|v| v.as_string()) + texture: face.get("texture") + .and_then(|v| v.as_str()) .map(|v| if v.starts_with('#') { v.to_owned() } else { "#".to_owned() + v }).unwrap(), cull_face: Direction::from_string( - face.find("cullface") - .and_then(|v| v.as_string()) + face.get("cullface") + .and_then(|v| v.as_str()) .unwrap_or("invalid") ), - rotation: face.find("rotation") + rotation: face.get("rotation") .and_then(|v| v.as_i64()) .map_or(0, |v| v as i32), - tint_index: face.find("tintindex") + tint_index: face.get("tintindex") .and_then(|v| v.as_i64()) .map_or(-1, |v| v as i32), }); @@ -441,16 +439,16 @@ impl Factory { } } - if let Some(rotation) = v.find("rotation") { + if let Some(rotation) = v.get("rotation") { element.rotation = Some(BlockRotation { - origin: rotation.find("origin").and_then(|v| v.as_array()).map_or([8.0, 8.0, 8.0], |v| [ + origin: rotation.get("origin").and_then(|v| v.as_array()).map_or([8.0, 8.0, 8.0], |v| [ v[0].as_f64().unwrap(), v[1].as_f64().unwrap(), v[2].as_f64().unwrap() ]), - axis: rotation.find("axis").and_then(|v| v.as_string()).unwrap_or("").to_owned(), - angle: rotation.find("angle").and_then(|v| v.as_f64()).unwrap_or(0.0), - rescale: rotation.find("rescale").and_then(|v| v.as_boolean()).unwrap_or(false), + axis: rotation.get("axis").and_then(|v| v.as_str()).unwrap_or("").to_owned(), + angle: rotation.get("angle").and_then(|v| v.as_f64()).unwrap_or(0.0), + rescale: rotation.get("rescale").and_then(|v| v.as_bool()).unwrap_or(false), }); } diff --git a/src/nbt/mod.rs b/src/nbt/mod.rs index 0ded16d3..db4d3023 100644 --- a/src/nbt/mod.rs +++ b/src/nbt/mod.rs @@ -127,7 +127,7 @@ impl Tag { } } - pub fn as_string(&self) -> Option<&str> { + pub fn as_str(&self) -> Option<&str> { match *self { Tag::String(ref val) => Some(&val[..]), _ => None, diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 6625da4a..7faf1975 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -906,29 +906,29 @@ impl Conn { let invalid_status = || Error::Err("Invalid status".to_owned()); - let version = try!(val.find("version").ok_or(invalid_status())); - let players = try!(val.find("players").ok_or(invalid_status())); + let version = try!(val.get("version").ok_or(invalid_status())); + let players = try!(val.get("players").ok_or(invalid_status())); Ok((Status { version: StatusVersion { - name: try!(version.find("name").and_then(Value::as_string).ok_or(invalid_status())) + name: try!(version.get("name").and_then(Value::as_str).ok_or(invalid_status())) .to_owned(), - protocol: try!(version.find("protocol") + protocol: try!(version.get("protocol") .and_then(Value::as_i64) .ok_or(invalid_status())) as i32, }, players: StatusPlayers { - max: try!(players.find("max") + max: try!(players.get("max") .and_then(Value::as_i64) .ok_or(invalid_status())) as i32, - online: try!(players.find("online") + online: try!(players.get("online") .and_then(Value::as_i64) .ok_or(invalid_status())) as i32, sample: Vec::new(), /* TODO */ }, - description: format::Component::from_value(try!(val.find("description") + description: format::Component::from_value(try!(val.get("description") .ok_or(invalid_status()))), - favicon: val.find("favicon").and_then(Value::as_string).map(|v| v.to_owned()), + favicon: val.get("favicon").and_then(Value::as_str).map(|v| v.to_owned()), }, ping)) } diff --git a/src/protocol/mojang.rs b/src/protocol/mojang.rs index f1506b61..d18610e3 100644 --- a/src/protocol/mojang.rs +++ b/src/protocol/mojang.rs @@ -14,7 +14,6 @@ use sha1::{self, Digest}; use serde_json; -use serde_json::builder::ObjectBuilder; use hyper; #[derive(Clone, Debug)] @@ -31,15 +30,14 @@ const VALIDATE_URL: &'static str = "https://authserver.mojang.com/validate"; impl Profile { pub fn login(username: &str, password: &str, token: &str) -> Result { - let req_msg = ObjectBuilder::new() - .insert("username", username) - .insert("password", password) - .insert("clientToken", token) - .insert_object("agent", |b| b - .insert("name", "Minecraft") - .insert("version", 1) - ) - .unwrap(); + let req_msg = json!({ + "username": username, + "password": password, + "clientToken": token, + "agent": { + "name": "Minecraft", + "version": 1 + }}); let req = try!(serde_json::to_string(&req_msg)); let client = hyper::Client::new(); @@ -49,25 +47,25 @@ impl Profile { .send()); let ret: serde_json::Value = try!(serde_json::from_reader(res)); - if let Some(error) = ret.find("error").and_then(|v| v.as_string()) { + if let Some(error) = ret.get("error").and_then(|v| v.as_str()) { return Err(super::Error::Err(format!( "{}: {}", error, - ret.find("errorMessage").and_then(|v| v.as_string()).unwrap()) + ret.get("errorMessage").and_then(|v| v.as_str()).unwrap()) )); } Ok(Profile { - username: ret.lookup("selectedProfile.name").and_then(|v| v.as_string()).unwrap().to_owned(), - id: ret.lookup("selectedProfile.id").and_then(|v| v.as_string()).unwrap().to_owned(), - access_token: ret.find("accessToken").and_then(|v| v.as_string()).unwrap().to_owned(), + username: ret.pointer("/selectedProfile/name").and_then(|v| v.as_str()).unwrap().to_owned(), + id: ret.pointer("/selectedProfile/id").and_then(|v| v.as_str()).unwrap().to_owned(), + access_token: ret.get("accessToken").and_then(|v| v.as_str()).unwrap().to_owned(), }) } pub fn refresh(self, token: &str) -> Result { - let req_msg = ObjectBuilder::new() - .insert("accessToken", self.access_token.clone()) - .insert("clientToken", token) - .unwrap(); + let req_msg = json!({ + "accessToken": self.access_token.clone(), + "clientToken": token + }); let req = try!(serde_json::to_string(&req_msg)); let client = hyper::Client::new(); @@ -84,17 +82,17 @@ impl Profile { .send()); let ret: serde_json::Value = try!(serde_json::from_reader(res)); - if let Some(error) = ret.find("error").and_then(|v| v.as_string()) { + if let Some(error) = ret.get("error").and_then(|v| v.as_str()) { return Err(super::Error::Err(format!( "{}: {}", error, - ret.find("errorMessage").and_then(|v| v.as_string()).unwrap()) + ret.get("errorMessage").and_then(|v| v.as_str()).unwrap()) )); } return Ok(Profile { - username: ret.lookup("selectedProfile.name").and_then(|v| v.as_string()).unwrap().to_owned(), - id: ret.lookup("selectedProfile.id").and_then(|v| v.as_string()).unwrap().to_owned(), - access_token: ret.find("accessToken").and_then(|v| v.as_string()).unwrap().to_owned(), + username: ret.pointer("/selectedProfile/name").and_then(|v| v.as_str()).unwrap().to_owned(), + id: ret.pointer("/selectedProfile/id").and_then(|v| v.as_str()).unwrap().to_owned(), + access_token: ret.get("accessToken").and_then(|v| v.as_str()).unwrap().to_owned(), }); } Ok(self) @@ -121,11 +119,11 @@ impl Profile { hash_val.to_owned() }; - let join_msg = ObjectBuilder::new() - .insert("accessToken", &self.access_token) - .insert("selectedProfile", &self.id) - .insert("serverId", hash_str) - .unwrap(); + let join_msg = json!({ + "accessToken": &self.access_token, + "selectedProfile": &self.id, + "serverId": hash_str + }); let join = serde_json::to_string(&join_msg).unwrap(); let client = hyper::Client::new(); diff --git a/src/render/mod.rs b/src/render/mod.rs index b3800727..e7e06cda 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -1060,12 +1060,12 @@ impl TextureManager { let res = self.resources.clone(); if let Some(val) = res.read().unwrap().open(plugin, &path) { let meta: serde_json::Value = serde_json::from_reader(val).unwrap(); - let animation = meta.find("animation").unwrap(); - let frame_time = animation.find("frametime").and_then(|v| v.as_i64()).unwrap_or(1); - let interpolate = animation.find("interpolate") - .and_then(|v| v.as_boolean()) + let animation = meta.get("animation").unwrap(); + let frame_time = animation.get("frametime").and_then(|v| v.as_i64()).unwrap_or(1); + let interpolate = animation.get("interpolate") + .and_then(|v| v.as_bool()) .unwrap_or(false); - let frames = if let Some(frames) = animation.find("frames") + let frames = if let Some(frames) = animation.get("frames") .and_then(|v| v.as_array()) { let mut out = Vec::with_capacity(frames.len()); for frame in frames { @@ -1076,8 +1076,8 @@ impl TextureManager { }) } else { out.push(AnimationFrame{ - index: frame.find("index").unwrap().as_i64().unwrap() as usize, - time: frame_time * frame.find("frameTime").unwrap().as_i64().unwrap(), + index: frame.get("index").unwrap().as_i64().unwrap() as usize, + time: frame_time * frame.get("frameTime").unwrap().as_i64().unwrap(), }) } } diff --git a/src/resources.rs b/src/resources.rs index e8efc11a..ab94f195 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -310,10 +310,10 @@ impl Manager { let file = fs::File::open(&location).unwrap(); let index: serde_json::Value = serde_json::from_reader(&file).unwrap(); let root_location = path::Path::new("./objects/"); - let objects = index.find("objects").and_then(|v| v.as_object()).unwrap(); + let objects = index.get("objects").and_then(|v| v.as_object()).unwrap(); Self::add_task(&progress_info, "Downloading Assets", "./objects", objects.len() as u64); for (k, v) in objects { - let hash = v.find("hash").and_then(|v| v.as_string()).unwrap(); + let hash = v.get("hash").and_then(|v| v.as_str()).unwrap(); let hash_path = format!("{}/{}", &hash[..2], hash); let location = root_location.join(&hash_path); if fs::metadata(&location).is_err(){ @@ -321,7 +321,7 @@ impl Manager { let res = client.get(&format!("http://resources.download.minecraft.net/{}", hash_path)) .send() .unwrap(); - let length = v.find("size").and_then(|v| v.as_u64()).unwrap(); + let length = v.get("size").and_then(|v| v.as_u64()).unwrap(); Self::add_task(&progress_info, "Downloading Asset", k, length); let mut tmp_file = location.to_owned(); tmp_file.set_file_name(format!("{}.tmp", hash)); @@ -456,10 +456,10 @@ impl ObjectPack { let location = path::Path::new(&loc); let file = fs::File::open(&location).unwrap(); let index: serde_json::Value = serde_json::from_reader(&file).unwrap(); - let objects = index.find("objects").and_then(|v| v.as_object()).unwrap(); + let objects = index.get("objects").and_then(|v| v.as_object()).unwrap(); let mut hash_objs = HashMap::with_hasher(BuildHasherDefault::default()); for (k, v) in objects { - hash_objs.insert(k.clone(), v.find("hash").and_then(|v| v.as_string()).unwrap().to_owned()); + hash_objs.insert(k.clone(), v.get("hash").and_then(|v| v.as_str()).unwrap().to_owned()); } ObjectPack { objects: hash_objs, diff --git a/src/screen/edit_server.rs b/src/screen/edit_server.rs index 683450f9..444beef0 100644 --- a/src/screen/edit_server.rs +++ b/src/screen/edit_server.rs @@ -48,7 +48,7 @@ impl EditServerEntry { Err(_) => { let mut info = BTreeMap::default(); info.insert("servers".to_owned(), Value::Array(vec![])); - Value::Object(info) + Value::Object(info.into_iter().collect()) } }; @@ -56,7 +56,7 @@ impl EditServerEntry { let mut entry = BTreeMap::default(); entry.insert("name".to_owned(), Value::String(name.to_owned())); entry.insert("address".to_owned(), Value::String(address.to_owned())); - Value::Object(entry) + Value::Object(entry.into_iter().collect()) }; { diff --git a/src/screen/server_list.rs b/src/screen/server_list.rs index 2c9b7fd7..1db256e2 100644 --- a/src/screen/server_list.rs +++ b/src/screen/server_list.rs @@ -118,12 +118,12 @@ impl ServerList { Err(_) => return, }; let servers_info: serde_json::Value = serde_json::from_reader(file).unwrap(); - let servers = servers_info.find("servers").unwrap().as_array().unwrap(); + let servers = servers_info.get("servers").unwrap().as_array().unwrap(); let mut offset = 0.0; for (index, svr) in servers.iter().enumerate() { - let name = svr.find("name").unwrap().as_string().unwrap().to_owned(); - let address = svr.find("address").unwrap().as_string().unwrap().to_owned(); + let name = svr.get("name").unwrap().as_str().unwrap().to_owned(); + let address = svr.get("address").unwrap().as_str().unwrap().to_owned(); // Everything is attached to this let back = ui::ImageBuilder::new() diff --git a/src/server/mod.rs b/src/server/mod.rs index f89f391b..788cbe90 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -718,10 +718,10 @@ impl Server { Some(nbt) => { if block_update.action == 9 { use format; - let line1 = format::Component::from_string(nbt.1.get("Text1").unwrap().as_string().unwrap()); - let line2 = format::Component::from_string(nbt.1.get("Text2").unwrap().as_string().unwrap()); - let line3 = format::Component::from_string(nbt.1.get("Text3").unwrap().as_string().unwrap()); - let line4 = format::Component::from_string(nbt.1.get("Text4").unwrap().as_string().unwrap()); + let line1 = format::Component::from_string(nbt.1.get("Text1").unwrap().as_str().unwrap()); + let line2 = format::Component::from_string(nbt.1.get("Text2").unwrap().as_str().unwrap()); + let line3 = format::Component::from_string(nbt.1.get("Text3").unwrap().as_str().unwrap()); + let line4 = format::Component::from_string(nbt.1.get("Text4").unwrap().as_str().unwrap()); self.world.add_block_entity_action(world::BlockEntityAction::UpdateSignText( block_update.location, line1, @@ -780,7 +780,7 @@ impl Server { continue; }, }; - if let Some(skin_url) = skin_blob.lookup("textures.SKIN.url").and_then(|v| v.as_string()) { + if let Some(skin_url) = skin_blob.pointer("/textures/SKIN/url").and_then(|v| v.as_str()) { info.skin_url = Some(skin_url.to_owned()); } } @@ -830,7 +830,7 @@ impl Server { let x = block_entity.1.get("x").unwrap().as_int().unwrap(); let y = block_entity.1.get("y").unwrap().as_int().unwrap(); let z = block_entity.1.get("z").unwrap().as_int().unwrap(); - let tile_id = block_entity.1.get("id").unwrap().as_string().unwrap(); + let tile_id = block_entity.1.get("id").unwrap().as_str().unwrap(); let action; match tile_id { // Fake a sign update From b17f296ab44c0c5a2e44b0786fa9d71b7cd85701 Mon Sep 17 00:00:00 2001 From: iceiix <43691553+iceiix@users.noreply.github.com> Date: Sat, 27 Oct 2018 17:03:34 -0700 Subject: [PATCH 35/45] Replace hyper with reqwest (#7) An old version of hyper was used before (0.8.0), in the process of updating to hyper 0.12.11, found this higher-level replacement/wrapper, reqwest 0.9.4 which is simpler to use than the latest hyper and serves the purpose of a simple HTTP client well * Begin updating to hyper 0.12.11 https://github.com/iceiix/steven/issues/4#issuecomment-425759778 * Use type variables for hyper::Client * Fix setting header syntax, Content-Type: application/json, 17->13 * Parse strings into URLs with url.parse::().unwrap() https://github.com/hyperium/hyper/blob/b20971cb4e5f158844aec5829eea1854e5b7d4b6/examples/client.rs#L25 * Use hyper::Request::post() then client.request() since client.post() removed * wait() on the ResponseFuture to get the Result * try! to unwrap the Result * status() is now a method * Concatenate body chunks unwrap into bytes, then parse JSON from byte slice, instead of from_reader which didn't compile * Replace send() with wait() on ResponseFuture * Parse HeaderValue to u64 * Slices implement std::io::Read trait * Read into_bytes() instead of read_to_end() * Disable boxed logger for now to workaround 'expected function, found macro' * Remove unnecessary mutability, warnings * Hack to parse twice to avoid double move * Use hyper-rustls pure Rust implementation for TLS for HTTPS in hyper * Start converting to reqwest: add Protocol::Error and reqwest::Error conversion * Use reqwest, replacing hyper, in protocol * Convert resources to use reqwest instead of hyper * Convert skin download to reqwest, instead of hyper * Remove hyper * Revert unnecessary variable name change req/body to reduce diff * Revert unnecessary whitespace change to reduce diff, align indentation on . * Fix authenticating to server, wrong method and join URL * Update Cargo.lock --- Cargo.lock | 808 +++++++++++++++++++++++++++++++++++++---- Cargo.toml | 2 +- src/console/mod.rs | 2 +- src/main.rs | 5 +- src/protocol/mod.rs | 14 +- src/protocol/mojang.rs | 45 +-- src/render/mod.rs | 20 +- src/resources.rs | 14 +- 8 files changed, 791 insertions(+), 119 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7628a47f..b88df7c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -64,6 +64,15 @@ name = "byteorder" version = "1.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bytes" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bzip2" version = "0.3.3" @@ -125,14 +134,20 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "cookie" -version = "0.2.5" +name = "core-foundation" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "core-foundation-sys" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -152,6 +167,15 @@ dependencies = [ "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-deque" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-epoch" version = "0.3.1" @@ -166,6 +190,19 @@ dependencies = [ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-epoch" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-utils" version = "0.2.2" @@ -174,6 +211,11 @@ dependencies = [ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-utils" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "deflate" version = "0.7.19" @@ -191,11 +233,24 @@ dependencies = [ "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "dtoa" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "either" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "encoding_rs" +version = "0.8.10" +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)", +] + [[package]] name = "fake-simd" version = "0.1.2" @@ -211,6 +266,24 @@ dependencies = [ "miniz_oxide_c_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "fnv" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -225,6 +298,20 @@ name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-cpupool" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "gcc" version = "0.3.54" @@ -266,17 +353,36 @@ dependencies = [ "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "h2" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hex" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "hpack" -version = "0.2.0" +name = "http" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -286,23 +392,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hyper" -version = "0.8.1" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hyper-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.13 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -332,6 +455,11 @@ dependencies = [ "tiff 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "indexmap" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "inflate" version = "0.4.3" @@ -340,6 +468,15 @@ dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "iovec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "itoa" version = "0.4.3" @@ -373,11 +510,6 @@ name = "khronos_api" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazy_static" version = "0.1.16" @@ -396,11 +528,26 @@ dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "lazycell" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "libc" version = "0.2.43" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "libflate" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "libressl-pnacl-sys" version = "2.1.6" @@ -410,11 +557,12 @@ dependencies = [ ] [[package]] -name = "log" -version = "0.3.9" +name = "lock_api" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -442,10 +590,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "mime" -version = "0.2.6" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mime_guess" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -477,6 +636,45 @@ dependencies = [ "miniz_oxide 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mio" +version = "0.6.16" +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)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio-uds" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "msdos_time" version = "0.1.6" @@ -486,6 +684,33 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "native-tls" +version = "0.2.2" +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)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "net2" +version = "0.2.33" +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)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "nodrop" version = "0.1.12" @@ -577,14 +802,6 @@ name = "num-traits" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "num_cpus" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "num_cpus" version = "1.8.0" @@ -611,6 +828,24 @@ dependencies = [ "openssl-sys-extras 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "openssl" +version = "0.10.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "openssl-probe" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "openssl-sys" version = "0.7.17" @@ -623,6 +858,17 @@ dependencies = [ "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "openssl-sys" +version = "0.9.39" +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)", + "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)", +] + [[package]] name = "openssl-sys-extras" version = "0.7.14" @@ -633,11 +879,75 @@ dependencies = [ "openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "owning_ref" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "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.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "percent-encoding" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "phf" +version = "0.7.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_codegen" +version = "0.7.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_generator" +version = "0.7.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_shared" +version = "0.7.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pkg-config" version = "0.3.14" @@ -755,11 +1065,45 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "reqwest" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.13 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustc-serialize" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ryu" version = "0.2.6" @@ -779,6 +1123,15 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "schannel" +version = "0.1.14" +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.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "scoped_threadpool" version = "0.1.9" @@ -810,6 +1163,39 @@ dependencies = [ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "security-framework" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "security-framework-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.79" @@ -825,6 +1211,17 @@ dependencies = [ "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "serde_urlencoded" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sha-1" version = "0.8.0" @@ -837,14 +1234,28 @@ dependencies = [ ] [[package]] -name = "solicit" -version = "0.4.4" +name = "siphasher" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "slab" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "smallvec" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "stable_deref_trait" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "steven" version = "0.0.1" @@ -855,12 +1266,12 @@ dependencies = [ "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", "flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -899,6 +1310,11 @@ version = "0.1.0" name = "steven_shared" version = "0.0.1" +[[package]] +name = "string" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "syn" version = "0.14.9" @@ -918,6 +1334,19 @@ dependencies = [ "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tempfile" +version = "3.0.4" +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)", + "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.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tiff" version = "0.2.1" @@ -940,14 +1369,162 @@ dependencies = [ ] [[package]] -name = "traitobject" -version = "0.0.1" +name = "tokio" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-codec" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-current-thread" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-executor" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-fs" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "typeable" +name = "tokio-io" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-tcp" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-threadpool" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-timer" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-udp" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-uds" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "try-lock" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "typenum" @@ -963,11 +1540,11 @@ dependencies = [ ] [[package]] -name = "unicode-bidi" -version = "0.2.6" +name = "unicase" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -989,15 +1566,11 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "url" -version = "0.5.10" +name = "unreachable" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1021,17 +1594,27 @@ dependencies = [ [[package]] name = "uuid" -version = "0.2.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "vcpkg" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "walkdir" version = "1.0.7" @@ -1042,6 +1625,16 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "want" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -1071,6 +1664,15 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "xml-rs" version = "0.7.0" @@ -1102,6 +1704,7 @@ dependencies = [ "checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" "checksum byte-tools 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "980479e6fde23246dfb54d47580d66b4e99202e7579c5eaa9fe10ecb5ebd2182" "checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" +"checksum bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0ce55bd354b095246fc34caf4e9e242f5297a7fd938b090cadfea6eee614aa62" "checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" "checksum bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5162604199bbb17690ede847eaa6120a3f33d5ab4dcc8e7c25b16d849ae79b" "checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" @@ -1110,51 +1713,73 @@ dependencies = [ "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)" = "" "checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" -"checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626" +"checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" +"checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" +"checksum crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3486aefc4c0487b9cb52372c97df0a48b8c249514af1ee99703bf70d2f2ceda1" "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" +"checksum crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30fecfcac6abfef8771151f8be4abc9e4edc112c2bcb233314cafde2680536e9" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" +"checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015" "checksum deflate 0.7.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8a6abb26e16e8d419b5c78662aa9f82857c2386a073da266840e474d5055ec86" "checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" +"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" +"checksum encoding_rs 0.8.10 (registry+https://github.com/rust-lang/crates.io-index)" = "065f4d0c826fdaef059ac45487169d918558e3cf86c9d89f6e81cf52369126e5" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "37847f133aae7acf82bb9577ccd8bda241df836787642654286e79679826a54b" +"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" +"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c" "checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" +"checksum h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd33bafe2e6370e6c8eb0cf1b8c5f93390b90acde7e9b03723f166b28b648ed" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" -"checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" +"checksum http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "24f58e8c2d8e886055c3ead7b28793e1455270b5fb39650984c224bc538ba581" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" -"checksum hyper 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb0f4d00bb781e559b6e66ae4b5479df0fdf9ab15949f52fa2f1f5de16d4cc07" +"checksum hyper 0.12.13 (registry+https://github.com/rust-lang/crates.io-index)" = "95ffee0d1d30de4313fdaaa485891ce924991d45bbc18adfc8ac5b1639e62fbb" +"checksum hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "32cd73f14ad370d3b4d4b7dce08f69b81536c82e39fcc89731930fe5788cd661" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum image 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60710fd3cb40c2434451d8d5147bcf39bbb68aae0741041133e09439cb2401e3" +"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" "checksum inflate 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6f53b811ee8e2057ccf9643ca6b4277de90efaf5e61e55fd5254576926bb4245" +"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b7d43206b34b3f94ea9445174bda196e772049b9bddbc620c9d29b2d20110d" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d5a08e2a31d665af8f1ca437eab6d00a93c9d62a549f73f9ed8fc2e55b5a91a7" "checksum khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "037ab472c33f67b5fbd3e9163a2645319e5356fcd355efa6d4eb7fff4bbcb554" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" "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 lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" +"checksum libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "21138fc6669f438ed7ae3559d5789a5f0ba32f28c1f0608d1e452b0bb06ee936" "checksum libressl-pnacl-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "cbc058951ab6a3ef35ca16462d7642c4867e6403520811f28537a4e2f2db3e71" -"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +"checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a" "checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" "checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" -"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" +"checksum mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0a907b83e7b9e987032439a387e187119cddafc92d5c2aaeb1d92580a793f630" +"checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" "checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" "checksum miniz_oxide 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9ba430291c9d6cedae28bcd2d49d1c32fc57d60cd49086646c5dd5673a870eb5" "checksum miniz_oxide_c_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5a5b8234d6103ebfba71e29786da4608540f862de5ce980a1c94f86a40ca0d51" +"checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" +"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum msdos_time 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aad9dfe950c057b1bfe9c1f2aa51583a8468ef2a5baba2ebbe06d775efeb7729" +"checksum native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8e08de0070bbf4c31f452ea2a70db092f36f6f2e4d897adf5674477d488fb2" +"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" "checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" @@ -1165,13 +1790,22 @@ dependencies = [ "checksum num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" "checksum num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e96f040177bb3da242b5b1ecf3f54b5d5af3efbbfb18608977a5d2767b22f10" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" -"checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" +"checksum openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "5e1309181cdcbdb51bc3b6bedb33dfac2a83b3d585033d3f6d9e22e8c1928613" "checksum openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)" = "c4117b6244aac42ed0150a6019b4d953d28247c5dd6ae6f46ae469b5f2318733" +"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)" = "89c47ee94c352eea9ddaf8e364be7f978a3bb6d66d73176572484238dd5a5c3f" +"checksum openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)" = "278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106" "checksum openssl-sys-extras 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)" = "11c5e1dba7d3d03d80f045bf0d60111dc69213b67651e7c889527a3badabb9fa" +"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" +"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" +"checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +"checksum phf 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "cec29da322b242f4c3098852c77a0ca261c9c01b806cae85a5572a1eb94db9a6" +"checksum phf_codegen 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "7d187f00cd98d5afbcd8898f6cf181743a449162aeb329dcd2f3849009e605ad" +"checksum phf_generator 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "03dc191feb9b08b0dc1330d6549b795b9d81aec19efe6b4a45aec8d4caee0c4b" +"checksum phf_shared 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "b539898d22d4273ded07f64a05737649dc69095d92cb87c7097ec68e3f150b93" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum pnacl-build-helper 1.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dfbe13ee77c06fb633d71c72438bd983286bb3521863a753ade8e951c7efb090" "checksum png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f54b9600d584d3b8a739e1662a595fab051329eff43f20e7d8cc22872962145b" @@ -1186,40 +1820,68 @@ dependencies = [ "checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" +"checksum reqwest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "00a5870d8edc74fc6e1eb58edbd2815d2243e1a2255d6bf9c82a7a875901b5db" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" +"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" "checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a74c2a98a354b20713b90cce70aef9e927e46110d1bc4ef728fd74e0d53eba60" "checksum sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c543ce8a6e33a30cb909612eeeb22e693848211a84558d5a00bb11e791b7ab7" +"checksum security-framework 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "697d3f3c23a618272ead9e1fb259c1411102b31c6af8b93f1d64cca9c3b0e8e0" +"checksum security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab01dfbe5756785b5b4d46e0289e5a18071dfa9a7c2b24213ea00b9ef9b665bf" +"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +"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_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce" +"checksum serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aaed41d9fb1e2f587201b863356590c90c1157495d811430a0c0325fe8169650" "checksum sha-1 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfd94fe9ed1245c2a1459f99373217b131a1b32b6d0922988b1e45b35249249" -"checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" +"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" +"checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" +"checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d" +"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" +"checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970" "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" "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 tiff 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a2cc6c4fd13cb1cfd20abdb196e794ceccb29371855b7e7f575945f920a5b3c2" "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" -"checksum traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "07eaeb7689bb7fca7ce15628319635758eda769fed481ecfe6686ddef2600616" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" +"checksum tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6e93c78d23cc61aa245a8acd2c4a79c4d7fa7fb5c3ca90d5737029f043a84895" +"checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" +"checksum tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f90fcd90952f0a496d438a976afba8e5c205fb12123f813d8ab3aa1c8436638c" +"checksum tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c117b6cf86bb730aab4834f10df96e4dd586eff2c3c27d3781348da49e255bde" +"checksum tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "60ae25f6b17d25116d2cba342083abe5255d3c2c79cb21ea11aa049c53bf7c75" +"checksum tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7392fe0a70d5ce0c882c4778116c519bd5dbaa8a7c3ae3d04578b3afafdcda21" +"checksum tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4b26fd37f1125738b2170c80b551f69ff6fecb277e6e5ca885e53eec2b005018" +"checksum tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad235e9dadd126b2d47f6736f65aa1fdcd6420e66ca63f44177bc78df89f912" +"checksum tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3929aee321c9220ed838ed6c3928be7f9b69986b0e3c22c972a66dbf8a298c68" +"checksum tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3a52f00c97fedb6d535d27f65cccb7181c8dd4c6edc3eda9ea93f6d45d05168e" +"checksum tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da941144b816d0dcda4db3a1ba87596e4df5e860a72b70783fe435891f80601c" +"checksum tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df195376b43508f01570bacc73e13a1de0854dc59e79d1ec09913e8db6dd2a70" +"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicode-bidi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "149319afc0ec718611d4a9208c0308e3b1b62dcfbd982e5e723f6ec35b909b92" +"checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum url 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4a3440c1ed62af4a2aee71c6fb78ef32ddcb75cfa24bf42f45e07c02b6d6a2f6" +"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" "checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" -"checksum uuid 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "885acc3b17fdef6230d1f7765dff1106dfd5e75a93c2f26459fbf600ed6dcc14" +"checksum uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dab5c5526c5caa3d106653401a267fed923e7046f35895ffcb5ca42db64942e6" +"checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" "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 walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" +"checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "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" +"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" "checksum zip 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "36b9e08fb518a65cf7e08a1e482573eb87a2f4f8c6619316612a3c1f162fe822" diff --git a/Cargo.toml b/Cargo.toml index 685c8983..8b44b7bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ opt-level = 1 sha-1 = "0.8.0" sdl2 = "0.31.0" byteorder = "1.2.6" -hyper = "0.8.0" +reqwest = "0.9.4" serde = "1.0.79" serde_json = "1.0.31" flate2 = "1.0.2" diff --git a/src/console/mod.rs b/src/console/mod.rs index 0474ebfa..355bd958 100644 --- a/src/console/mod.rs +++ b/src/console/mod.rs @@ -26,7 +26,7 @@ use render; use format::{Component, TextComponent, Color}; const FILTERED_CRATES: &'static [&'static str] = &[ - "hyper", + //"reqwest", // TODO: needed? "mime", ]; diff --git a/src/main.rs b/src/main.rs index 5a9699ec..333f3fd3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,7 @@ extern crate byteorder; extern crate serde_json; extern crate openssl; extern crate sha1; -extern crate hyper; +extern crate reqwest; extern crate flate2; extern crate rand; extern crate hex; @@ -179,7 +179,8 @@ fn main() { let proxy = console::ConsoleProxy::new(con.clone()); - log::set_boxed_logger(Box::new(proxy)).unwrap(); + // TODO: fix error[E0423]: expected function, found macro `log::set_boxed_logger` + //log::set_boxed_logger(Box::new(proxy)).unwrap(); log::set_max_level(log::LevelFilter::Trace); info!("Starting steven"); diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 7faf1975..93f6e89c 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -16,7 +16,7 @@ use openssl::crypto::symm; use serde_json; -use hyper; +use reqwest; pub mod mojang; @@ -690,7 +690,7 @@ pub enum Error { Disconnect(format::Component), IOError(io::Error), Json(serde_json::Error), - Hyper(hyper::Error), + Reqwest(reqwest::Error), } impl convert::From for Error { @@ -705,9 +705,9 @@ impl convert::From for Error { } } -impl convert::From for Error { - fn from(e: hyper::Error) -> Error { - Error::Hyper(e) +impl convert::From for Error { + fn from(e: reqwest::Error) -> Error { + Error::Reqwest(e) } } @@ -718,7 +718,7 @@ impl ::std::error::Error for Error { Error::Disconnect(_) => "Disconnect", Error::IOError(ref e) => e.description(), Error::Json(ref e) => e.description(), - Error::Hyper(ref e) => e.description(), + Error::Reqwest(ref e) => e.description(), } } } @@ -730,7 +730,7 @@ impl ::std::fmt::Display for Error { Error::Disconnect(ref val) => write!(f, "{}", val), Error::IOError(ref e) => e.fmt(f), Error::Json(ref e) => e.fmt(f), - Error::Hyper(ref e) => e.fmt(f), + Error::Reqwest(ref e) => e.fmt(f), } } } diff --git a/src/protocol/mojang.rs b/src/protocol/mojang.rs index d18610e3..d546363a 100644 --- a/src/protocol/mojang.rs +++ b/src/protocol/mojang.rs @@ -14,7 +14,7 @@ use sha1::{self, Digest}; use serde_json; -use hyper; +use reqwest; #[derive(Clone, Debug)] pub struct Profile { @@ -40,11 +40,11 @@ impl Profile { }}); let req = try!(serde_json::to_string(&req_msg)); - let client = hyper::Client::new(); - let res = try!(client.post(LOGIN_URL) - .body(&req) - .header(hyper::header::ContentType("application/json".parse().unwrap())) - .send()); + let client = reqwest::Client::new(); + let res = client.post(LOGIN_URL) + .header(reqwest::header::CONTENT_TYPE, "application/json") + .body(req) + .send()?; let ret: serde_json::Value = try!(serde_json::from_reader(res)); if let Some(error) = ret.get("error").and_then(|v| v.as_str()) { @@ -68,18 +68,19 @@ impl Profile { }); let req = try!(serde_json::to_string(&req_msg)); - let client = hyper::Client::new(); - let res = try!(client.post(VALIDATE_URL) - .body(&req) - .header(hyper::header::ContentType("application/json".parse().unwrap())) - .send()); + let client = reqwest::Client::new(); + let res = client.post(VALIDATE_URL) + .header(reqwest::header::CONTENT_TYPE, "application/json") + .body(req) + .send()?; - if res.status != hyper::status::StatusCode::NoContent { + if res.status() != reqwest::StatusCode::NO_CONTENT { + let req = try!(serde_json::to_string(&req_msg)); // TODO: fix parsing twice to avoid move // Refresh needed - let res = try!(client.post(REFRESH_URL) - .body(&req) - .header(hyper::header::ContentType("application/json".parse().unwrap())) - .send()); + let res = client.post(REFRESH_URL) + .header(reqwest::header::CONTENT_TYPE, "application/json") + .body(req) + .send()?; let ret: serde_json::Value = try!(serde_json::from_reader(res)); if let Some(error) = ret.get("error").and_then(|v| v.as_str()) { @@ -126,13 +127,13 @@ impl Profile { }); let join = serde_json::to_string(&join_msg).unwrap(); - let client = hyper::Client::new(); - let res = try!(client.post(JOIN_URL) - .body(&join) - .header(hyper::header::ContentType("application/json".parse().unwrap())) - .send()); + let client = reqwest::Client::new(); + let res = client.post(JOIN_URL) + .header(reqwest::header::CONTENT_TYPE, "application/json") + .body(join) + .send()?; - if res.status == hyper::status::StatusCode::NoContent { + if res.status() == reqwest::StatusCode::NO_CONTENT { Ok(()) } else { Err(super::Error::Err("Failed to auth with server".to_owned())) diff --git a/src/render/mod.rs b/src/render/mod.rs index e7e06cda..cf036585 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -837,8 +837,8 @@ impl TextureManager { } fn process_skins(recv: mpsc::Receiver, reply: mpsc::Sender<(String, Option)>) { - use hyper; - let client = hyper::Client::new(); + use reqwest; + let client = reqwest::Client::new(); loop { let hash = match recv.recv() { Ok(val) => val, @@ -856,7 +856,7 @@ impl TextureManager { } } - fn obtain_skin(client: &::hyper::Client, hash: &str) -> Result { + fn obtain_skin(client: &::reqwest::Client, hash: &str) -> Result { use std::io::Read; use std::fs; use std::path::Path; @@ -871,14 +871,22 @@ impl TextureManager { try!(file.read_to_end(&mut buf)); } else { // Need to download it - let url = format!("http://textures.minecraft.net/texture/{}", hash); - let mut res = match client.get(&url).send() { + let url = &format!("http://textures.minecraft.net/texture/{}", hash); + let mut res = match client.get(url).send() { Ok(val) => val, Err(err) => { return Err(Error::new(ErrorKind::ConnectionAborted, err)); } }; - try!(res.read_to_end(&mut buf)); + let mut buf = vec![]; + match res.read_to_end(&mut buf) { + Ok(_) => {}, + Err(err) => { + // TODO: different error for failure to read? + return Err(Error::new(ErrorKind::InvalidData, err)); + } + } + // Save to cache let mut file = try!(fs::File::create(cache_path)); try!(file.write_all(&buf)); diff --git a/src/resources.rs b/src/resources.rs index ab94f195..a9b9cfb5 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -24,7 +24,7 @@ use std::collections::HashMap; use std::hash::BuildHasherDefault; use serde_json; -use hyper; +use reqwest; use zip; use types::hash::FNVHash; @@ -285,15 +285,15 @@ impl Manager { self.vanilla_assets_chan = Some(recv); } thread::spawn(move || { - let client = hyper::Client::new(); + let client = reqwest::Client::new(); if fs::metadata(&location).is_err(){ fs::create_dir_all(location.parent().unwrap()).unwrap(); let res = client.get(ASSET_INDEX_URL) .send() .unwrap(); - let length = *res.headers.get::().unwrap(); - Self::add_task(&progress_info, "Downloading Asset Index", &*location.to_string_lossy(), *length); + let length = res.headers().get(reqwest::header::CONTENT_LENGTH).unwrap().to_str().unwrap().parse::().unwrap(); + Self::add_task(&progress_info, "Downloading Asset Index", &*location.to_string_lossy(), length); { let mut file = fs::File::create(format!("index-{}.tmp", ASSET_VERSION)).unwrap(); let mut progress = ProgressRead { @@ -354,15 +354,15 @@ impl Manager { let progress_info = self.vanilla_progress.clone(); thread::spawn(move || { - let client = hyper::Client::new(); + let client = reqwest::Client::new(); let res = client.get(VANILLA_CLIENT_URL) .send() .unwrap(); let mut file = fs::File::create(format!("{}.tmp", RESOURCES_VERSION)).unwrap(); - let length = *res.headers.get::().unwrap(); + let length = res.headers().get(reqwest::header::CONTENT_LENGTH).unwrap().to_str().unwrap().parse::().unwrap(); let task_file = format!("./resources-{}", RESOURCES_VERSION); - Self::add_task(&progress_info, "Downloading Core Assets", &task_file, *length); + Self::add_task(&progress_info, "Downloading Core Assets", &task_file, length); { let mut progress = ProgressRead { read: res, From 5ce9bf3fa3e9715d2c7da4f9c4730f51b9fc0fe3 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 27 Oct 2018 17:21:57 -0700 Subject: [PATCH 36/45] Update to lazy_static 1.1.0 in blocks/Cargo.toml https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 8 +------- blocks/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b88df7c9..dcecc193 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -510,11 +510,6 @@ name = "khronos_api" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lazy_static" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazy_static" version = "0.2.11" @@ -1289,7 +1284,7 @@ version = "0.0.1" dependencies = [ "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "steven_shared 0.0.1", ] @@ -1757,7 +1752,6 @@ dependencies = [ "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d5a08e2a31d665af8f1ca437eab6d00a93c9d62a549f73f9ed8fc2e55b5a91a7" "checksum khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "037ab472c33f67b5fbd3e9163a2645319e5356fcd355efa6d4eb7fff4bbcb554" -"checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" "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 lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" diff --git a/blocks/Cargo.toml b/blocks/Cargo.toml index 9a82d68b..c67d6d90 100644 --- a/blocks/Cargo.toml +++ b/blocks/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = [ "Thinkofdeath " ] [dependencies] -lazy_static = "0.1.15" +lazy_static = "1.1.0" cgmath = "0.7.0" collision = {git = "https://github.com/TheUnnamedDude/collision-rs", rev = "f80825e"} From 80c740c1c53b844c562d41837030118d74105992 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 27 Oct 2018 18:11:26 -0700 Subject: [PATCH 37/45] Update to cgmath 0.16.1, collision 0.18.0 https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 86 ++++++++++++++++++++++++++++----- Cargo.toml | 4 +- blocks/Cargo.toml | 4 +- src/entity/block_entity/sign.rs | 4 +- src/entity/player.rs | 26 +++++----- src/entity/systems.rs | 8 +-- src/render/mod.rs | 4 +- src/render/model.rs | 2 +- src/server/mod.rs | 8 +-- src/server/sun.rs | 6 +-- src/world/mod.rs | 5 +- 11 files changed, 108 insertions(+), 49 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dcecc193..262352f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,6 +3,11 @@ name = "adler32" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "approx" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "arrayvec" version = "0.4.7" @@ -20,6 +25,19 @@ dependencies = [ "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bit-set" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bit-vec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "bitflags" version = "0.7.0" @@ -103,12 +121,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cgmath" -version = "0.7.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "approx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -121,11 +140,15 @@ dependencies = [ [[package]] name = "collision" -version = "0.5.1" -source = "git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e#f80825eca687ff1053ff492e54fa782944c9cf6b" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "approx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-set 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cgmath 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -792,6 +815,14 @@ dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "num-traits" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-traits" version = "0.2.6" @@ -1195,6 +1226,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "serde" version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_derive" +version = "1.0.80" +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.14 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_json" @@ -1257,8 +1301,8 @@ version = "0.0.1" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", + "cgmath 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "collision 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1282,8 +1326,8 @@ dependencies = [ name = "steven_blocks" version = "0.0.1" dependencies = [ - "cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)", + "cgmath 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "collision 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "steven_shared 0.0.1", ] @@ -1320,6 +1364,16 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syn" +version = "0.15.14" +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)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tempdir" version = "0.3.7" @@ -1690,8 +1744,11 @@ dependencies = [ [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" +"checksum approx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08abcc3b4e9339e33a3d0a5ed15d84a687350c05689d825e0f6655eef9e76a94" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" +"checksum bit-set 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6f1efcc46c18245a69c38fcc5cc650f16d3a59d034f3106e9ed63748f695730a" +"checksum bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4440d5cb623bb7390ae27fec0bb6c61111969860f8e3ae198bfa0663645e67cf" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49665c62e0e700857531fa5d3763e91b539ff1abeebd56808d378b495870d60d" @@ -1704,9 +1761,9 @@ dependencies = [ "checksum bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5162604199bbb17690ede847eaa6120a3f33d5ab4dcc8e7c25b16d849ae79b" "checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" "checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" -"checksum cgmath 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75e93b3eb66e74ffb946a69ff54c6026c1399960241c843f249ea0127b96b9f6" +"checksum cgmath 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "64a4b57c8f4e3a2e9ac07e0f6abc9c24b6fc9e1b54c3478cfb598f3d0023e51c" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum collision 0.5.1 (git+https://github.com/TheUnnamedDude/collision-rs?rev=f80825e)" = "" +"checksum collision 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "928b2092661bb4cd6f5e5a39c639ac6553a1e69750fab6de2edb86e2304f9eaa" "checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" "checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" "checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" @@ -1783,6 +1840,7 @@ dependencies = [ "checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" "checksum num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" "checksum num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e96f040177bb3da242b5b1ecf3f54b5d5af3efbbfb18608977a5d2767b22f10" +"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" @@ -1830,6 +1888,7 @@ dependencies = [ "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "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.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" "checksum serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce" "checksum serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aaed41d9fb1e2f587201b863356590c90c1157495d811430a0c0325fe8169650" "checksum sha-1 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfd94fe9ed1245c2a1459f99373217b131a1b32b6d0922988b1e45b35249249" @@ -1839,6 +1898,7 @@ dependencies = [ "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970" "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" +"checksum syn 0.15.14 (registry+https://github.com/rust-lang/crates.io-index)" = "baaba45c6bf60fe29aaf241fa33306c0b75c801edea8378263a8f043b09a5634" "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 tiff 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a2cc6c4fd13cb1cfd20abdb196e794ceccb29371855b7e7f575945f920a5b3c2" diff --git a/Cargo.toml b/Cargo.toml index 8b44b7bc..e9df79a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,9 +23,9 @@ rand = "0.5.5" hex = "0.3.2" base64 = "0.9.3" log = "0.4.5" -cgmath = "0.7.0" +cgmath = "0.16.1" lazy_static = "1.1.0" -collision = {git = "https://github.com/TheUnnamedDude/collision-rs", rev = "f80825e"} +collision = "0.18.0" openssl = "0.7.8" # clippy = "*" diff --git a/blocks/Cargo.toml b/blocks/Cargo.toml index c67d6d90..213f9bf1 100644 --- a/blocks/Cargo.toml +++ b/blocks/Cargo.toml @@ -5,8 +5,8 @@ authors = [ "Thinkofdeath " ] [dependencies] lazy_static = "1.1.0" -cgmath = "0.7.0" -collision = {git = "https://github.com/TheUnnamedDude/collision-rs", rev = "f80825e"} +cgmath = "0.16.1" +collision = "0.18.0" [dependencies.steven_shared] diff --git a/src/entity/block_entity/sign.rs b/src/entity/block_entity/sign.rs index abd26115..ecffe087 100644 --- a/src/entity/block_entity/sign.rs +++ b/src/entity/block_entity/sign.rs @@ -87,7 +87,7 @@ impl ecs::System for SignRenderer { fn entity_added(&mut self, m: &mut ecs::Manager, e: ecs::Entity, world: &mut world::World, renderer: &mut render::Renderer) { use std::f64::consts::PI; - use cgmath::{Vector3, Matrix4, Decomposed, Rotation3, Rad, Angle, Quaternion}; + use cgmath::{Vector3, Matrix4, Decomposed, Rotation3, Rad, Quaternion}; let position = *m.get_component(e, self.position).unwrap(); let info = m.get_component_mut(e, self.sign_info).unwrap(); info.dirty = false; @@ -172,7 +172,7 @@ impl ecs::System for SignRenderer { mdl.z = position.z as f32 + 0.5; mdl.matrix[0] = Matrix4::from(Decomposed { scale: 1.0, - rot: Quaternion::from_angle_y(Rad::new(info.rotation as f32)), + rot: Quaternion::from_angle_y(Rad(info.rotation as f32)), disp: Vector3::new(position.x as f32 + 0.5, -position.y as f32 - 0.5, position.z as f32 + 0.5), }) * Matrix4::from_translation(Vector3::new(info.offset_x as f32, -info.offset_y as f32, info.offset_z as f32)); } diff --git a/src/entity/player.rs b/src/entity/player.rs index 85820600..8e780440 100644 --- a/src/entity/player.rs +++ b/src/entity/player.rs @@ -16,7 +16,7 @@ use render; use render::model::{self, FormatState}; use types::Gamemode; use collision::{Aabb, Aabb3}; -use cgmath::{self, Point3, Vector3, Matrix4, Decomposed, Rotation3, Rad, Angle, Quaternion}; +use cgmath::{self, Point3, Vector3, Matrix4, Decomposed, Rotation3, Rad, Quaternion}; use std::collections::HashMap; use std::hash::BuildHasherDefault; use types::hash::FNVHash; @@ -198,7 +198,7 @@ impl ecs::System for PlayerRenderer { }; let offset_matrix = Matrix4::from(Decomposed { scale: 1.0, - rot: Quaternion::from_angle_y(Rad::new(PI + rotation.yaw as f32)), + rot: Quaternion::from_angle_y(Rad(PI + rotation.yaw as f32)), disp: offset, }); @@ -207,19 +207,19 @@ impl ecs::System for PlayerRenderer { let ang = (position.position.x - renderer.camera.pos.x).atan2(position.position.z - renderer.camera.pos.z) as f32; mdl.matrix[PlayerModelPart::NameTag as usize] = Matrix4::from(Decomposed { scale: 1.0, - rot: Quaternion::from_angle_y(Rad::new(ang)), + rot: Quaternion::from_angle_y(Rad(ang)), disp: offset + Vector3::new(0.0, (-24.0/16.0) - 0.6, 0.0), }); } mdl.matrix[PlayerModelPart::Head as usize] = offset_matrix * Matrix4::from(Decomposed { scale: 1.0, - rot: Quaternion::from_angle_x(Rad::new(-rotation.pitch as f32)), + rot: Quaternion::from_angle_x(Rad(-rotation.pitch as f32)), disp: Vector3::new(0.0, -12.0/16.0 - 12.0/16.0, 0.0), }); mdl.matrix[PlayerModelPart::Body as usize] = offset_matrix * Matrix4::from(Decomposed { scale: 1.0, - rot: Quaternion::from_angle_x(Rad::new(0.0)), + rot: Quaternion::from_angle_x(Rad(0.0)), disp: Vector3::new(0.0, -12.0/16.0 - 6.0/16.0, 0.0), }); @@ -233,12 +233,12 @@ impl ecs::System for PlayerRenderer { mdl.matrix[PlayerModelPart::LegRight as usize] = offset_matrix * Matrix4::from(Decomposed { scale: 1.0, - rot: Quaternion::from_angle_x(Rad::new(ang as f32)), + rot: Quaternion::from_angle_x(Rad(ang as f32)), disp: Vector3::new(2.0/16.0, -12.0/16.0, 0.0), }); mdl.matrix[PlayerModelPart::LegLeft as usize] = offset_matrix * Matrix4::from(Decomposed { scale: 1.0, - rot: Quaternion::from_angle_x(Rad::new(-ang as f32)), + rot: Quaternion::from_angle_x(Rad(-ang as f32)), disp: Vector3::new(-2.0/16.0, -12.0/16.0, 0.0), }); @@ -257,15 +257,15 @@ impl ecs::System for PlayerRenderer { mdl.matrix[PlayerModelPart::ArmRight as usize] = offset_matrix * Matrix4::from_translation( Vector3::new(6.0/16.0, -12.0/16.0-12.0/16.0, 0.0) - ) * Matrix4::from(Quaternion::from_angle_x(Rad::new(-(ang * 0.75) as f32))) - * Matrix4::from(Quaternion::from_angle_z(Rad::new((i_time.cos() * 0.06 - 0.06) as f32))) - * Matrix4::from(Quaternion::from_angle_x(Rad::new((i_time.sin() * 0.06 - ((7.5 - (player_model.arm_time-7.5).abs()) / 7.5)) as f32))); + ) * Matrix4::from(Quaternion::from_angle_x(Rad(-(ang * 0.75) as f32))) + * Matrix4::from(Quaternion::from_angle_z(Rad((i_time.cos() * 0.06 - 0.06) as f32))) + * Matrix4::from(Quaternion::from_angle_x(Rad((i_time.sin() * 0.06 - ((7.5 - (player_model.arm_time-7.5).abs()) / 7.5)) as f32))); mdl.matrix[PlayerModelPart::ArmLeft as usize] = offset_matrix * Matrix4::from_translation( Vector3::new(-6.0/16.0, -12.0/16.0-12.0/16.0, 0.0) - ) * Matrix4::from(Quaternion::from_angle_x(Rad::new((ang * 0.75) as f32))) - * Matrix4::from(Quaternion::from_angle_z(Rad::new(-(i_time.cos() * 0.06 - 0.06) as f32))) - * Matrix4::from(Quaternion::from_angle_x(Rad::new(-(i_time.sin() * 0.06) as f32))); + ) * Matrix4::from(Quaternion::from_angle_x(Rad((ang * 0.75) as f32))) + * Matrix4::from(Quaternion::from_angle_z(Rad(-(i_time.cos() * 0.06 - 0.06) as f32))) + * Matrix4::from(Quaternion::from_angle_x(Rad(-(i_time.sin() * 0.06) as f32))); let mut update = true; if position.moved { diff --git a/src/entity/systems.rs b/src/entity/systems.rs index d237e413..f6c1e597 100644 --- a/src/entity/systems.rs +++ b/src/entity/systems.rs @@ -4,7 +4,7 @@ use ecs; use world; use render; use shared::Position as BPos; -use cgmath::EuclideanVector; +use cgmath::InnerSpace; pub struct ApplyVelocity { filter: ecs::Filter, @@ -115,7 +115,7 @@ impl ecs::System for UpdateLastPosition { for e in m.find(&self.filter) { let pos = m.get_component_mut(e, self.position).unwrap(); - pos.moved = (pos.position - pos.last_position).length2() > 0.01; + pos.moved = (pos.position - pos.last_position).magnitude2() > 0.01; pos.last_position = pos.position; } } @@ -157,7 +157,7 @@ impl ecs::System for LerpPosition { let target_pos = m.get_component(e, self.target_position).unwrap(); pos.position = pos.position + (target_pos.position - pos.position) * delta * target_pos.lerp_amount; - let len = (pos.position - target_pos.position).length2() ; + let len = (pos.position - target_pos.position).magnitude2() ; if len < 0.001 || len > 100.0 * 100.0 { pos.position = target_pos.position; } @@ -267,7 +267,7 @@ impl ecs::System for LightEntity { let max_y = (pos.position.y + bounds.bounds.max.y).ceil() as i32 + 1; let max_z = (pos.position.z + bounds.bounds.max.z).ceil() as i32 + 1; - let length = (bounds.bounds.max - bounds.bounds.min).length() as f32; + let length = (bounds.bounds.max - bounds.bounds.min).magnitude() as f32; for y in min_y .. max_y { for z in min_z .. max_z { diff --git a/src/render/mod.rs b/src/render/mod.rs index cf036585..7de6ec6e 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -29,7 +29,7 @@ use image; use image::{GenericImage, GenericImageView}; use byteorder::{WriteBytesExt, NativeEndian}; use serde_json; -use cgmath::{self, Vector, Point, SquareMatrix}; +use cgmath::prelude::*; use world; use collision; @@ -257,7 +257,7 @@ impl Renderer { self.perspective_matrix = cgmath::Matrix4::from( cgmath::PerspectiveFov { - fovy: cgmath::Rad::from(cgmath::Deg{s: 90f32}), + fovy: cgmath::Rad::from(cgmath::Deg(90f32)), aspect: (width as f32 / height as f32), near: 0.1f32, far: 500.0f32, diff --git a/src/render/model.rs b/src/render/model.rs index 293fe677..00de52aa 100644 --- a/src/render/model.rs +++ b/src/render/model.rs @@ -212,7 +212,7 @@ impl Manager { gl::blend_func(collection.blend_s, collection.blend_d); for model in collection.models.values() { - if model.radius > 0.0 && frustum.contains(Sphere { + if model.radius > 0.0 && frustum.contains(&Sphere { center: Point3::new(model.x, -model.y, model.z), radius: model.radius }) == collision::Relation::Out { diff --git a/src/server/mod.rs b/src/server/mod.rs index 788cbe90..270ca633 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -27,7 +27,7 @@ use render; use settings::Stevenkey; use ecs; use entity; -use cgmath::{self, Point}; +use cgmath::prelude::*; use types::Gamemode; use shared::{Axis, Position}; use format; @@ -323,7 +323,7 @@ impl Server { if let Some(player) = self.player { let position = self.entities.get_component(player, self.position).unwrap(); let rotation = self.entities.get_component(player, self.rotation).unwrap(); - renderer.camera.pos = cgmath::Point::from_vec(position.position + cgmath::Vector3::new(0.0, 1.62, 0.0)); + renderer.camera.pos = cgmath::Point3::from_vec(position.position + cgmath::Vector3::new(0.0, 1.62, 0.0)); renderer.camera.yaw = rotation.yaw; renderer.camera.pitch = rotation.pitch; } @@ -344,7 +344,7 @@ impl Server { self.world.tick(&mut self.entities); if self.player.is_some() { - if let Some((pos, bl, _, _)) = target::trace_ray(&self.world, 4.0, renderer.camera.pos.to_vec(), renderer.view_vector.cast(), target::test_block) { + if let Some((pos, bl, _, _)) = target::trace_ray(&self.world, 4.0, renderer.camera.pos.to_vec(), renderer.view_vector.cast().unwrap(), target::test_block) { self.target_info.update(renderer, pos, bl); } else { self.target_info.clear(renderer); @@ -505,7 +505,7 @@ impl Server { pub fn on_right_click(&mut self, renderer: &mut render::Renderer) { use shared::Direction; if self.player.is_some() { - if let Some((pos, _, face, at)) = target::trace_ray(&self.world, 4.0, renderer.camera.pos.to_vec(), renderer.view_vector.cast(), target::test_block) { + if let Some((pos, _, face, at)) = target::trace_ray(&self.world, 4.0, renderer.camera.pos.to_vec(), renderer.view_vector.cast().unwrap(), target::test_block) { self.write_packet(packet::play::serverbound::PlayerBlockPlacement { location: pos, face: protocol::VarInt(match face { diff --git a/src/server/sun.rs b/src/server/sun.rs index b7aa04c0..a26bb865 100644 --- a/src/server/sun.rs +++ b/src/server/sun.rs @@ -1,7 +1,7 @@ use render; use render::model; -use cgmath::{Vector3, Matrix4, Decomposed, Rotation3, Rad, Angle, Quaternion}; +use cgmath::{Vector3, Matrix4, Decomposed, Rotation3, Rad, Quaternion}; pub struct SunModel { sun: model::ModelKey, @@ -38,7 +38,7 @@ impl SunModel { let sun = renderer.model.get_model(self.sun).unwrap(); sun.matrix[0] = Matrix4::from(Decomposed { scale: 1.0, - rot: Quaternion::from_angle_z(Rad::new(-(time * PI) as f32)), + rot: Quaternion::from_angle_z(Rad(-(time * PI) as f32)), disp: Vector3::new( (renderer.camera.pos.x + ox) as f32, -(renderer.camera.pos.y + oy) as f32, @@ -51,7 +51,7 @@ impl SunModel { let moon = renderer.model.get_model(self.moon).unwrap(); moon.matrix[0] = Matrix4::from(Decomposed { scale: 1.0, - rot: Quaternion::from_angle_z(Rad::new((PI - (time * PI)) as f32)), + rot: Quaternion::from_angle_z(Rad((PI - (time * PI)) as f32)), disp: Vector3::new( (renderer.camera.pos.x - ox) as f32, -(renderer.camera.pos.y - oy) as f32, diff --git a/src/world/mod.rs b/src/world/mod.rs index 975900e0..0bf9c446 100644 --- a/src/world/mod.rs +++ b/src/world/mod.rs @@ -23,7 +23,7 @@ use types::hash::FNVHash; use protocol; use render; use collision; -use cgmath; +use cgmath::prelude::*; use chunk_builder; use ecs; use entity::block_entity; @@ -318,7 +318,6 @@ impl World { pub fn compute_render_list(&mut self, renderer: &mut render::Renderer) { use chunk_builder; - use cgmath::Vector; use std::collections::VecDeque; self.render_list.clear(); @@ -347,7 +346,7 @@ impl World { let min = cgmath::Point3::new(pos.0 as f32 * 16.0, -pos.1 as f32 * 16.0, pos.2 as f32 * 16.0); let bounds = collision::Aabb3::new(min, min + cgmath::Vector3::new(16.0, -16.0, 16.0)); - if renderer.frustum.contains(bounds) == collision::Relation::Out && from != Direction::Invalid { + if renderer.frustum.contains(&bounds) == collision::Relation::Out && from != Direction::Invalid { continue; } (sec.is_some(), sec.map_or(chunk_builder::CullInfo::all_vis(), |v| v.cull_info)) From 6a41539896220b4b42eb19a3e9a9815dd819d5d6 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 27 Oct 2018 18:15:51 -0700 Subject: [PATCH 38/45] Update to khronos_api 2.2.0 https://github.com/iceiix/steven/issues/4 --- Cargo.lock | 8 +------- gl/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 262352f7..9c1c85cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -523,11 +523,6 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "khronos_api" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "khronos_api" version = "2.2.0" @@ -1337,7 +1332,7 @@ name = "steven_gl" version = "0.0.1" dependencies = [ "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1807,7 +1802,6 @@ dependencies = [ "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum jpeg-decoder 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b7d43206b34b3f94ea9445174bda196e772049b9bddbc620c9d29b2d20110d" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum khronos_api 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d5a08e2a31d665af8f1ca437eab6d00a93c9d62a549f73f9ed8fc2e55b5a91a7" "checksum khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "037ab472c33f67b5fbd3e9163a2645319e5356fcd355efa6d4eb7fff4bbcb554" "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" diff --git a/gl/Cargo.toml b/gl/Cargo.toml index 2aaa3ff2..42ebd965 100644 --- a/gl/Cargo.toml +++ b/gl/Cargo.toml @@ -6,7 +6,7 @@ build = "build.rs" [build-dependencies] gl_generator = "0.9.0" -khronos_api = "1.0.0" +khronos_api = "2.2.0" [dependencies] libc = "0.2" From 51a5e3ed5c6553fef44b5465adad6fffc861448f Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 27 Oct 2018 19:56:34 -0700 Subject: [PATCH 39/45] Update to rust-openssl 0.10.15 (from 0.7.8) Major API change, the last of the outdated dependencies Closes https://github.com/iceiix/steven/issues/4 Note: would still like to replace the last usages of the OpenSSL crate https://github.com/iceiix/steven/issues/2 but it is needed for CFB8 until a replacement is available (maybe https://github.com/RustCrypto/stream-ciphers/issues/4) --- Cargo.lock | 116 +------------------------------------------- Cargo.toml | 2 +- src/protocol/mod.rs | 28 ++++++++--- src/server/mod.rs | 16 +++--- 4 files changed, 32 insertions(+), 130 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c1c85cc..55e6e884 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -335,20 +335,6 @@ dependencies = [ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "gcc" -version = "0.3.54" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "gdi32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "generic-array" version = "0.12.0" @@ -561,14 +547,6 @@ dependencies = [ "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "libressl-pnacl-sys" -version = "2.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "pnacl-build-helper 1.4.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "lock_api" version = "0.1.4" @@ -836,19 +814,6 @@ name = "opaque-debug" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "openssl" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gcc 0.3.54 (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)", - "openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys-extras 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "openssl" version = "0.10.15" @@ -867,18 +832,6 @@ name = "openssl-probe" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "openssl-sys" -version = "0.7.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "libressl-pnacl-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "openssl-sys" version = "0.9.39" @@ -890,16 +843,6 @@ dependencies = [ "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "openssl-sys-extras" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "owning_ref" version = "0.3.3" @@ -974,15 +917,6 @@ name = "pkg-config" version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "pnacl-build-helper" -version = "1.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "png" version = "0.12.0" @@ -1135,15 +1069,6 @@ name = "safemem" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "same-file" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "schannel" version = "0.1.14" @@ -1303,7 +1228,7 @@ dependencies = [ "image 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1369,15 +1294,6 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "tempfile" version = "3.0.4" @@ -1627,15 +1543,6 @@ dependencies = [ "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "user32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "uuid" version = "0.7.1" @@ -1659,16 +1566,6 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "walkdir" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "want" version = "0.0.6" @@ -1783,8 +1680,6 @@ dependencies = [ "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" -"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c" "checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" @@ -1808,7 +1703,6 @@ dependencies = [ "checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" "checksum libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "21138fc6669f438ed7ae3559d5789a5f0ba32f28c1f0608d1e452b0bb06ee936" -"checksum libressl-pnacl-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "cbc058951ab6a3ef35ca16462d7642c4867e6403520811f28537a4e2f2db3e71" "checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a" "checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" "checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" @@ -1839,11 +1733,8 @@ dependencies = [ "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" "checksum openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "5e1309181cdcbdb51bc3b6bedb33dfac2a83b3d585033d3f6d9e22e8c1928613" -"checksum openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)" = "c4117b6244aac42ed0150a6019b4d953d28247c5dd6ae6f46ae469b5f2318733" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.7.17 (registry+https://github.com/rust-lang/crates.io-index)" = "89c47ee94c352eea9ddaf8e364be7f978a3bb6d66d73176572484238dd5a5c3f" "checksum openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)" = "278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106" -"checksum openssl-sys-extras 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)" = "11c5e1dba7d3d03d80f045bf0d60111dc69213b67651e7c889527a3badabb9fa" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" @@ -1853,7 +1744,6 @@ dependencies = [ "checksum phf_generator 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "03dc191feb9b08b0dc1330d6549b795b9d81aec19efe6b4a45aec8d4caee0c4b" "checksum phf_shared 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "b539898d22d4273ded07f64a05737649dc69095d92cb87c7097ec68e3f150b93" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" -"checksum pnacl-build-helper 1.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dfbe13ee77c06fb633d71c72438bd983286bb3521863a753ade8e951c7efb090" "checksum png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f54b9600d584d3b8a739e1662a595fab051329eff43f20e7d8cc22872962145b" "checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" "checksum proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "ffe022fb8c8bd254524b0b3305906c1921fa37a84a644e29079a9e62200c3901" @@ -1871,7 +1761,6 @@ dependencies = [ "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" -"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" "checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" "checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" @@ -1893,7 +1782,6 @@ dependencies = [ "checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970" "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" "checksum syn 0.15.14 (registry+https://github.com/rust-lang/crates.io-index)" = "baaba45c6bf60fe29aaf241fa33306c0b75c801edea8378263a8f043b09a5634" -"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 tiff 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a2cc6c4fd13cb1cfd20abdb196e794ceccb29371855b7e7f575945f920a5b3c2" "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" @@ -1918,12 +1806,10 @@ dependencies = [ "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" -"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" "checksum uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dab5c5526c5caa3d106653401a267fed923e7046f35895ffcb5ca42db64942e6" "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" "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 walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" diff --git a/Cargo.toml b/Cargo.toml index e9df79a7..25d6c021 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ log = "0.4.5" cgmath = "0.16.1" lazy_static = "1.1.0" collision = "0.18.0" -openssl = "0.7.8" +openssl = "0.10.15" # clippy = "*" [dependencies.steven_gl] diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 93f6e89c..9785873b 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -14,9 +14,10 @@ #![allow(dead_code)] -use openssl::crypto::symm; +use openssl::symm; use serde_json; use reqwest; +use openssl; pub mod mojang; @@ -691,6 +692,7 @@ pub enum Error { IOError(io::Error), Json(serde_json::Error), Reqwest(reqwest::Error), + OpenSSL(openssl::error::ErrorStack), } impl convert::From for Error { @@ -711,6 +713,12 @@ impl convert::From for Error { } } +impl convert::From for Error { + fn from(e: openssl::error::ErrorStack) -> Error { + Error::OpenSSL(e) + } +} + impl ::std::error::Error for Error { fn description(&self) -> &str { match *self { @@ -719,6 +727,7 @@ impl ::std::error::Error for Error { Error::IOError(ref e) => e.description(), Error::Json(ref e) => e.description(), Error::Reqwest(ref e) => e.description(), + Error::OpenSSL(ref e) => e.description(), } } } @@ -731,6 +740,7 @@ impl ::std::fmt::Display for Error { Error::IOError(ref e) => e.fmt(f), Error::Json(ref e) => e.fmt(f), Error::Reqwest(ref e) => e.fmt(f), + Error::OpenSSL(ref e) => e.fmt(f), } } } @@ -857,8 +867,10 @@ impl Conn { } pub fn enable_encyption(&mut self, key: &[u8], decrypt: bool) { - let cipher = symm::Crypter::new(symm::Type::AES_128_CFB8); - cipher.init(if decrypt { symm::Mode::Decrypt } else { symm::Mode::Encrypt }, key, key); + let cipher = symm::Crypter::new(symm::Cipher::aes_128_cfb8(), + if decrypt { symm::Mode::Decrypt } else { symm::Mode::Encrypt }, + key, + Some(key)).unwrap(); self.cipher = Option::Some(cipher); } @@ -967,8 +979,9 @@ impl Read for Conn { Option::None => self.stream.read(buf), Option::Some(cipher) => { let ret = try!(self.stream.read(buf)); - let data = cipher.update(&buf[..ret]); - for i in 0..ret { + let mut data = vec![0; ret + symm::Cipher::aes_128_cfb8().block_size()]; + let count = cipher.update(&buf[..ret], &mut data).unwrap(); + for i in 0..count { buf[i] = data[i]; } Ok(ret) @@ -982,8 +995,9 @@ impl Write for Conn { match self.cipher.as_mut() { Option::None => self.stream.write(buf), Option::Some(cipher) => { - let data = cipher.update(buf); - try!(self.stream.write_all(&data[..])); + let mut data = vec![0; buf.len() + symm::Cipher::aes_128_cfb8().block_size()]; + let count = cipher.update(buf, &mut data).unwrap(); + try!(self.stream.write_all(&data[..count])); Ok(buf.len()) } } diff --git a/src/server/mod.rs b/src/server/mod.rs index 270ca633..bad00f29 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -102,8 +102,8 @@ macro_rules! handle_packet { impl Server { pub fn connect(resources: Arc>, profile: mojang::Profile, address: &str) -> Result { - use openssl::crypto::pkey; - use openssl::crypto::rand::rand_bytes; + use openssl::rand::rand_bytes; + use openssl::rsa::{Rsa, Padding}; let mut conn = try!(protocol::Conn::new(address)); let host = conn.host.clone(); @@ -144,12 +144,14 @@ impl Server { }; } - let mut key = pkey::PKey::new(); - key.load_pub(&packet.public_key.data); - let shared = rand_bytes(16); + let rsa = Rsa::public_key_from_der(&packet.public_key.data).unwrap(); + let mut shared = [0; 16]; + rand_bytes(&mut shared).unwrap(); - let shared_e = key.public_encrypt_with_padding(&shared, pkey::EncryptionPadding::PKCS1v15); - let token_e = key.public_encrypt_with_padding(&packet.verify_token.data, pkey::EncryptionPadding::PKCS1v15); + let mut shared_e = vec![0; rsa.size() as usize]; + let mut token_e = vec![0; rsa.size() as usize]; + rsa.public_encrypt(&shared, &mut shared_e, Padding::PKCS1)?; + rsa.public_encrypt(&packet.verify_token.data, &mut token_e, Padding::PKCS1)?; try!(profile.join_server(&packet.server_id, &shared, &packet.public_key.data)); From bf0159209c6f84e1cfba97383dbff645b03dc0cd Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 28 Oct 2018 09:40:21 -0700 Subject: [PATCH 40/45] Update Travis-CI to test against known good nightly --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 78f06ffd..25a45b4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ sudo: required dist: trusty rust: - nightly + - nightly-2018-10-24 before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2 ; fi From 3f67d8477cef7d2df63364323ae6b9f033bb69f3 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 28 Oct 2018 09:46:22 -0700 Subject: [PATCH 41/45] Try adding mesa dev packages for Linux Travis-CI script https://travis-ci.org/iceiix/steven/jobs/447445632 The following packages have unmet dependencies: libsdl2-dev : Depends: libegl1-mesa-dev Depends: libgles2-mesa-dev --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 25a45b4d..da95b06e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo chown root:wheel /usr/local/bin/brew ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew link sdl2 ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq ; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libsdl2-dev libsdl2-mixer-dev libssl-dev gcc ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libsdl2-dev libsdl2-mixer-dev libssl-dev gcc libegl1-mesa-dev libgles2-mesa-dev ; fi script: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib" ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include ; fi From 541d8c22b8a90da1bbdadf45ce7de0f99181e1ec Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 28 Oct 2018 10:04:56 -0700 Subject: [PATCH 42/45] Travis-CI: allow nightly to fail without error since it is often broken https://docs.travis-ci.com/user/languages/rust/#stq=&stp=0 --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index da95b06e..0c4b3870 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,10 @@ dist: trusty rust: - nightly - nightly-2018-10-24 +matrix: + allow_failures: + - rust: nightly + fast_finish: true before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2 ; fi From c477fa00892c328ac4016b7ba066e352c92b643e Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 28 Oct 2018 10:06:59 -0700 Subject: [PATCH 43/45] Travis-CI: cache the cargo dependencies, so they are only recompiled when updated --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0c4b3870..bfdbffb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ matrix: allow_failures: - rust: nightly fast_finish: true +cache: cargo before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2 ; fi From 56a1cb2b76c7b8464f3de5a962d2cba54f79446d Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 28 Oct 2018 19:45:57 -0700 Subject: [PATCH 44/45] Fix logging with set_boxed_logger, add std feature to dep https://github.com/rust-lang-nursery/log/issues/303 --- Cargo.toml | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 25d6c021..b313dd8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ image = "0.20.0" rand = "0.5.5" hex = "0.3.2" base64 = "0.9.3" -log = "0.4.5" +log = { version = "0.4.5", features = ["std"] } cgmath = "0.16.1" lazy_static = "1.1.0" collision = "0.18.0" diff --git a/src/main.rs b/src/main.rs index 333f3fd3..4d8c418c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -180,7 +180,7 @@ fn main() { let proxy = console::ConsoleProxy::new(con.clone()); // TODO: fix error[E0423]: expected function, found macro `log::set_boxed_logger` - //log::set_boxed_logger(Box::new(proxy)).unwrap(); + log::set_boxed_logger(Box::new(proxy)).unwrap(); log::set_max_level(log::LevelFilter::Trace); info!("Starting steven"); From c36d0706ace9a620365c983f47617e905adc6e70 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Mon, 29 Oct 2018 17:10:08 -0700 Subject: [PATCH 45/45] Remove obsolete comment --- src/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 4d8c418c..0efd7a6d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -179,7 +179,6 @@ fn main() { let proxy = console::ConsoleProxy::new(con.clone()); - // TODO: fix error[E0423]: expected function, found macro `log::set_boxed_logger` log::set_boxed_logger(Box::new(proxy)).unwrap(); log::set_max_level(log::LevelFilter::Trace);