From 5b55672e7220aa223b20b4b9d37c2dd3b3ff5291 Mon Sep 17 00:00:00 2001 From: Nerijus Arlauskas Date: Sat, 1 Dec 2018 00:42:19 +0200 Subject: [PATCH 1/8] Init cleanup --- lesson-25-x-terrain/src/debug.rs | 12 ++++++++++++ lesson-25-x-terrain/src/main.rs | 11 +---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lesson-25-x-terrain/src/debug.rs b/lesson-25-x-terrain/src/debug.rs index 00c5d10..f542cd5 100644 --- a/lesson-25-x-terrain/src/debug.rs +++ b/lesson-25-x-terrain/src/debug.rs @@ -1,4 +1,16 @@ use failure; +use env_logger; + +pub fn init_logging() { + let mut builder = env_logger::Builder::new(); + builder.filter(None, log::LevelFilter::Trace); + builder.default_format_module_path(true); + builder.default_format_level(true); + if ::std::env::var("RUST_LOG").is_ok() { + builder.parse(&::std::env::var("RUST_LOG").unwrap()); + } + builder.init(); +} pub fn failure_to_string(e: failure::Error) -> String { use std::fmt::Write; diff --git a/lesson-25-x-terrain/src/main.rs b/lesson-25-x-terrain/src/main.rs index 6433fcd..389fb69 100644 --- a/lesson-25-x-terrain/src/main.rs +++ b/lesson-25-x-terrain/src/main.rs @@ -1,18 +1,9 @@ -use env_logger; use log::*; -use failure; mod debug; fn main() { - let mut builder = env_logger::Builder::new(); - builder.filter(None, log::LevelFilter::Trace); - builder.default_format_module_path(true); - builder.default_format_level(true); - if ::std::env::var("RUST_LOG").is_ok() { - builder.parse(&::std::env::var("RUST_LOG").unwrap()); - } - builder.init(); + debug::init_logging(); if let Err(e) = run() { error!("{}", debug::failure_to_string(e)); From f28d5db952d93a599dcf2f77ecb646cc8247d4c7 Mon Sep 17 00:00:00 2001 From: Nerijus Arlauskas Date: Sat, 1 Dec 2018 15:00:01 +0200 Subject: [PATCH 2/8] Update some cargo deps --- Cargo.lock | 1420 +++++++++++++------- lesson-24-x-text/src/main.rs | 3 +- lesson-25-x-terrain/Cargo.toml | 1 + lesson-25-x-terrain/core/shaders/quad.frag | 13 + lesson-25-x-terrain/core/shaders/quad.vert | 17 + lesson-25-x-terrain/src/main.rs | 25 +- lesson-25-x-terrain/src/onion.rs | 0 lib/resources/Cargo.toml | 2 + lib/resources/src/backend/filesystem.rs | 11 + 9 files changed, 989 insertions(+), 503 deletions(-) create mode 100644 lesson-25-x-terrain/core/shaders/quad.frag create mode 100644 lesson-25-x-terrain/core/shaders/quad.vert create mode 100644 lesson-25-x-terrain/src/onion.rs diff --git a/Cargo.lock b/Cargo.lock index 20adbe2..4b635af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [[package]] name = "adler32" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -8,17 +8,18 @@ name = "aho-corasick" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "alga" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "approx 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libm 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-complex 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)", ] [[package]] @@ -26,7 +27,7 @@ name = "approx" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -40,10 +41,10 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -51,39 +52,39 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" -version = "0.1.16" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (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.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base64" -version = "0.9.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -115,7 +116,7 @@ name = "blake2-rfc" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -145,7 +146,7 @@ dependencies = [ [[package]] name = "build_const" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -160,7 +161,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.6" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -169,12 +170,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.4" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.2" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -187,10 +188,10 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.29" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -203,7 +204,7 @@ dependencies = [ "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -223,7 +224,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -232,7 +233,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -240,7 +241,7 @@ name = "core-foundation-sys" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -256,7 +257,7 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -267,15 +268,15 @@ dependencies = [ "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crc" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -287,17 +288,39 @@ dependencies = [ "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-deque" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.1 (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 = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (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.2.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)", + "nodrop 0.1.13 (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-epoch" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.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)", ] @@ -306,15 +329,23 @@ name = "crossbeam-utils" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-utils" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "deflate" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.2 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -331,14 +362,14 @@ name = "dirs" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "redox_users 0.2.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 = "dtoa" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -347,7 +378,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -360,13 +391,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "env_logger" -version = "0.5.13" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -383,7 +414,7 @@ name = "euclid" version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -391,8 +422,8 @@ name = "expat-sys" version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -400,7 +431,7 @@ name = "failure" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -409,10 +440,10 @@ name = "failure_derive" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.15 (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.13 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -422,12 +453,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "filetime" -version = "0.1.15" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -435,26 +466,35 @@ name = "flate2" version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "flate2" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2-crc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "flate2-crc" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "float-cmp" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -488,14 +528,14 @@ dependencies = [ "euclid 0.18.2 (registry+https://github.com/rust-lang/crates.io-index)", "float-ord 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lyon_path 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "servo-fontconfig 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -517,10 +557,28 @@ name = "freetype" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "servo-freetype-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "fsevent" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fsevent-sys" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -537,7 +595,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.18" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -545,7 +603,7 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "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)", ] @@ -567,7 +625,7 @@ dependencies = [ [[package]] name = "gif" -version = "0.10.0" +version = "0.10.1" 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)", @@ -595,7 +653,7 @@ name = "gl_generator" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "khronos_api 2.1.0 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -610,7 +668,7 @@ dependencies = [ [[package]] name = "half" -version = "1.1.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -618,9 +676,9 @@ name = "harfbuzz-sys" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -629,17 +687,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "harfbuzz-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rusttype 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rusttype 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "httparse" -version = "1.2.4" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "humantime" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -647,50 +705,52 @@ dependencies = [ [[package]] name = "hyper" -version = "0.11.18" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (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)", - "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (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.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "want 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper-tls" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "idna" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.6 (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.5 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -699,13 +759,13 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gif 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "jpeg-decoder 0.1.15 (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-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.2.3 (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.5 (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)", ] @@ -716,12 +776,12 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gif 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "jpeg-decoder 0.1.15 (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.35 (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.5 (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)", @@ -732,7 +792,29 @@ name = "inflate" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "inotify" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "inotify-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -748,13 +830,13 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itertools" -version = "0.7.8" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -762,7 +844,7 @@ dependencies = [ [[package]] name = "itoa" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -771,7 +853,7 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -785,7 +867,7 @@ dependencies = [ [[package]] name = "khronos_api" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -803,11 +885,6 @@ name = "lazy_static" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lazycell" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazycell" version = "1.2.0" @@ -866,7 +943,7 @@ version = "0.1.0" dependencies = [ "gl 0.1.0", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -876,7 +953,7 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -886,7 +963,7 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -897,7 +974,7 @@ dependencies = [ "gl 0.1.0", "lesson_10_render_gl_derive 0.1.0", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -906,11 +983,11 @@ version = "0.1.0" dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_11_render_gl_derive 0.1.0", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -919,11 +996,11 @@ version = "0.1.0" dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_12_render_gl_derive 0.1.0", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -932,12 +1009,12 @@ version = "0.1.0" dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_13_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -946,12 +1023,12 @@ version = "0.1.0" dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_14_x_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -961,12 +1038,12 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_15_x_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -976,12 +1053,12 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_16_x_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -991,13 +1068,13 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_17_x_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1007,14 +1084,14 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_18_x_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "tobj 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1024,14 +1101,14 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_19_x_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "tobj 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1041,14 +1118,14 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_20_x_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "tobj 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1058,16 +1135,16 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_21_x_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", - "ncollide3d 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ncollide3d 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tobj 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1077,16 +1154,16 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_22_x_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", - "ncollide3d 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ncollide3d 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tobj 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1096,24 +1173,24 @@ dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_23_x_render_gl_derive 0.1.0", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", - "ncollide3d 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ncollide3d 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tobj 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lesson-24-x" version = "0.1.0" dependencies = [ - "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", @@ -1124,9 +1201,9 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lyon_path 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "lyon_tessellation 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "nalgebra-glm 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ncollide3d 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ncollide3d 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "resources 0.1.0", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "syntect 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1137,10 +1214,11 @@ dependencies = [ name = "lesson-25-x" version = "0.1.0" dependencies = [ - "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "resources 0.1.0", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1260,7 +1338,7 @@ dependencies = [ name = "lesson_24_x_render" version = "0.1.0" dependencies = [ - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1272,15 +1350,15 @@ dependencies = [ "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "font-kit 0.1.0 (git+https://github.com/Nercury/font-kit?branch=patch-lyon-deps)", "gl 0.1.0", - "half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "int_hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "lesson_24_x_render_gl_derive 0.1.0", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lyon_path 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "lyon_tessellation 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", - "ncollide3d 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ncollide3d 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "resources 0.1.0", "slotmap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1296,19 +1374,24 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.36" +version = "0.2.44" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libflate" -version = "0.1.14" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.2 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "libm" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "linked-hash-map" version = "0.5.1" @@ -1316,9 +1399,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lock_api" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1335,7 +1419,7 @@ name = "log" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1343,7 +1427,7 @@ name = "lyon_geom" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.18.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1353,9 +1437,9 @@ name = "lyon_geom" version = "0.12.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)", + "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1385,17 +1469,17 @@ name = "malloc_buf" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "matches" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "matrixmultiply" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rawpointer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1403,10 +1487,12 @@ dependencies = [ [[package]] name = "memchr" -version = "2.0.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1414,7 +1500,7 @@ name = "memmap" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1430,10 +1516,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "mime" -version = "0.3.5" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1441,8 +1527,8 @@ name = "miniz-sys" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (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.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1450,8 +1536,8 @@ name = "miniz_oxide" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1459,7 +1545,7 @@ name = "miniz_oxide" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1467,53 +1553,74 @@ name = "miniz_oxide_c_api" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "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.44 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio" -version = "0.6.13" +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 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (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.44 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (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.31 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.3.0 (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-extras" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (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.44 (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.31 (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 = "nalgebra" -version = "0.16.10" +version = "0.16.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "alga 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "alga 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "approx 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "generic-array 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "matrixmultiply 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "matrixmultiply 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "num-complex 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)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1522,10 +1629,10 @@ name = "nalgebra-glm" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "alga 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "alga 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "approx 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1534,72 +1641,88 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.9.24 (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.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ncollide3d" -version = "0.17.1" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "alga 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "alga 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "approx 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (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.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "net2" -version = "0.2.31" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 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)", - "libc 0.2.36 (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)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "notify" +version = "4.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num" version = "0.1.42" 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-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.37 (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-complex" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.5 (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-derive" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.15 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1607,16 +1730,16 @@ name = "num-integer" version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.5 (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.35" +version = "0.1.37" 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.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1625,7 +1748,7 @@ version = "0.1.42" 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.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1634,7 +1757,7 @@ 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.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1642,12 +1765,12 @@ name = "num-traits" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.5 (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.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1655,7 +1778,7 @@ name = "num_cpus" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1671,7 +1794,7 @@ name = "once_cell" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1681,7 +1804,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "onig_sys 69.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1690,9 +1813,9 @@ name = "onig_sys" version = "69.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (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.44 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1702,25 +1825,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl" -version = "0.9.23" +version = "0.9.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (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.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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-sys" -version = "0.9.24" +version = "0.9.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.2 (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.44 (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]] @@ -1728,26 +1851,35 @@ name = "ordered-float" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.5 (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 = "owning_ref" +version = "0.4.0" +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.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.1.5 (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.2.14" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1774,7 +1906,7 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.9" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1782,9 +1914,9 @@ name = "plist" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1795,14 +1927,14 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "deflate 0.7.18 (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.35 (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 = "proc-macro2" -version = "0.4.15" +version = "0.4.24" 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)", @@ -1820,10 +1952,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.6.8" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1832,36 +1964,104 @@ 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.36 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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.2" +version = "0.4.3" 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.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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" -version = "0.5.4" +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.36 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.2.2 (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" +version = "0.6.1" +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.44 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (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_chacha" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_core" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_pcg" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "rawpointer" @@ -1870,7 +2070,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rayon" -version = "1.0.2" +version = "1.0.3" 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)", @@ -1885,7 +2085,7 @@ 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.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1896,7 +2096,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "redox_syscall" -version = "0.1.37" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1904,7 +2104,7 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1914,28 +2114,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1943,16 +2143,15 @@ name = "relay" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "remove_dir_all" -version = "0.3.0" +version = "0.5.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)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1960,20 +2159,20 @@ name = "reqwest" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libflate 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1982,7 +2181,8 @@ version = "0.1.0" dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1996,36 +2196,49 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.5" +version = "0.1.9" 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 = "rusttype" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "approx 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "stb_truetype 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ryu" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "safemem" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "same-file" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schannel" -version = "0.1.10" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2034,7 +2247,7 @@ dependencies = [ [[package]] name = "scoped-tls" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2054,7 +2267,7 @@ 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.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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)", @@ -2065,11 +2278,11 @@ name = "sdl2-sys" version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2079,7 +2292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2089,9 +2302,22 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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.80" @@ -2102,31 +2328,30 @@ name = "serde_derive" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.15 (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.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.9" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.43 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_urlencoded" -version = "0.5.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "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.80 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2134,7 +2359,7 @@ name = "servo-fontconfig" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "servo-fontconfig-sys 4.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2144,7 +2369,7 @@ version = "4.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "expat-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "servo-freetype-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2153,13 +2378,13 @@ name = "servo-freetype-sys" version = "4.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sha-1" -version = "0.8.0" +version = "0.8.1" 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)", @@ -2193,7 +2418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "slab" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2208,12 +2433,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.4" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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 = "stb_truetype" version = "0.2.4" @@ -2230,7 +2460,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "roxmltree 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "simplecss 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "svgtypes 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2257,21 +2487,11 @@ dependencies = [ [[package]] name = "syn" -version = "0.14.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.15 (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 = "syn" -version = "0.15.13" +version = "0.15.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2285,12 +2505,12 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.15 (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.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2301,17 +2521,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "onig 4.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "plist 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2322,22 +2542,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "tar" -version = "0.4.14" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tempdir" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.3.0 (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]] @@ -2353,8 +2573,8 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2373,17 +2593,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (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.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.2.3 (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.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2392,28 +2612,90 @@ name = "tobj" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "tokio" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.11 (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)", + "num_cpus 1.8.0 (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.4 (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.7 (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.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.4 (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.11 (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-core" -version = "0.1.12" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (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)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "tokio-io" +name = "tokio-current-thread" +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-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 = [ - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "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.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-io" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.11 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2422,24 +2704,79 @@ name = "tokio-proto" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-reactor" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.1 (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.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (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-service" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (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.11 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-threadpool" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.1 (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.6 (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.6.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-timer" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.1 (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]] @@ -2447,18 +2784,54 @@ name = "tokio-tls" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.17 (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-udp" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.11 (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.6 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-uds" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.11 (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.44 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (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-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.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "try-lock" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "twox-hash" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2468,7 +2841,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ucd-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2485,10 +2858,10 @@ dependencies = [ "lyon_path 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "lyon_tessellation 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "metrohash 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "resources 0.1.0", - "sha-1 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slotmap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "usvg 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2496,10 +2869,10 @@ dependencies = [ [[package]] name = "unicase" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2507,12 +2880,12 @@ name = "unicode-bidi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.6 (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-normalization" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2540,11 +2913,11 @@ dependencies = [ [[package]] name = "url" -version = "1.6.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.6 (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)", ] @@ -2553,8 +2926,8 @@ name = "usvg" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libflate 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "lyon_geom 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "rctree 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2569,7 +2942,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "vcpkg" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2579,7 +2952,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "version_check" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2589,11 +2962,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "walkdir" -version = "2.1.3" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "want" +version = "0.0.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)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2653,10 +3037,10 @@ dependencies = [ [[package]] name = "xattr" -version = "0.1.11" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2681,16 +3065,16 @@ dependencies = [ ] [metadata] -"checksum adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6cbd0b9af8587c72beadc9f72d35b9fbb070982c9e6203e46e93f10df25f8f45" +"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" -"checksum alga 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3d5dbb7fa6898343fd31e14e8abf2563b6c61a81c1a2e15a678a2f351a249ed" +"checksum alga 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24bb00eeca59f2986c747b8c2f271d52310ce446be27428fc34705138b155778" "checksum approx 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f71f10b5c4946a64aad7b8cf65e3406cd3da22fc448595991d22423cf6db67b4" "checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392" -"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" +"checksum arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f405cc4c21cd8b784f6c8fc2adf9bc00f59558f0049b5ec21517f875963040cc" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" -"checksum backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbbf59b1c43eefa8c3ede390fcc36820b4999f7914104015be25025e0d62af2" -"checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" -"checksum base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "229d032f1a99302697f10b27167ae6d03d49d032e6a8e2550e8d3fc13356d2b4" +"checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" +"checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" +"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9f2fb9e29e72fd6bc12071533d5dc7664cb01480c59406f656d7ac25c7bd8ff7" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" @@ -2699,14 +3083,14 @@ dependencies = [ "checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" "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.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e90dc84f5e62d2ebe7676b83c22d33b6db8bd27340fb6ffbff0a364efa0cb9c9" +"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.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" -"checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" -"checksum cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "deaf9ec656256bb25b404c51ef50097207b9cbb29c933d31f92cae5a8a0ffee0" -"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +"checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" +"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" +"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb" +"checksum cmake 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "6ec65ee4f9c9d16f335091d23693457ed4928657ba4982289d7fafee03bc614a" "checksum cocoa 0.18.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cf79daa4e11e5def06e55306aa3601b87de6b5149671529318da048f67cdd77b" "checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" @@ -2716,26 +3100,30 @@ dependencies = [ "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9" "checksum core-text 13.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7210eea4baa4b51d7319d90e4787d8a2b472c8d5d9926dc39be85fecac0e6df7" -"checksum crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd5d02c0aac6bd68393ed69e00bbc2457f3e89075c6349db7189618dc4ddc1d7" +"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.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe1b6f945f824c7a25afe44f62e25d714c0cc523f8e99d8db5cd1026e1269d3" "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" +"checksum crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2449aaa4ec7ef96e5fb24db16024b935df718e9ae1cec0a1e68feeca2efca7b8" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" -"checksum deflate 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)" = "32c8120d981901a9970a3a1c97cf8b630e0fa8c3ca31e75b6fd6fd5f9f427b31" +"checksum crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c55913cc2799171a550e307918c0a360e8c16004820291bf3b638969b4a01816" +"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 dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "88972de891f6118092b643d85a0b28e0678e0f948d7f879aa32f2d5aafe97d2a" -"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" +"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" "checksum dwrote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "30a998e9ff70cd208ccdc4f864e998688bf61d7b897dccec8e17a884d17358bf" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" -"checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" +"checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e" "checksum euclid 0.18.2 (registry+https://github.com/rust-lang/crates.io-index)" = "59b34ec7d95d70d5cda27301d6182bc17abce8b5b52e260f5ff32c677923bbb0" "checksum euclid 0.19.3 (registry+https://github.com/rust-lang/crates.io-index)" = "600657e7e5c03bfbccdc68721bc3b5abcb761553973387124eae9c9e4f02c210" "checksum expat-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" "checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7" "checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "714653f3e34871534de23771ac7b26e999651a0a228f47beb324dfdf1dd4b10f" +"checksum filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a2df5c1a8c4be27e7707789dc42ae65976e60b394afd293d1419ab915833e646" "checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423" -"checksum flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3b0c7353385f92079524de3b7116cf99d73947c08a7472774e9b3b04bff3b901" +"checksum flate2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96971e4fc2737f211ec8236fe16ac67695838ca3e25567c07b4f837d1f8f829c" +"checksum flate2-crc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8a792245eaed7747984647ce20582507985d69ccfacdddcb60bd5f451f21cbc5" "checksum float-cmp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "134a8fa843d80a51a5b77d36d42bc2def9edcb0262c914861d08129fd1926600" "checksum float-ord 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e" "checksum floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2c60b71d9dbcd810a3be879dc9aafac6cec5c50dc2346e245f61f54a61fdf22" @@ -2744,43 +3132,47 @@ dependencies = [ "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 freetype 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "11926b2b410b469d0e9399eca4cbbe237a9ef02176c485803b29216307e8e028" +"checksum fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "c4bbbf71584aeed076100b5665ac14e3d85eeb31fdbb45fbd41ef9a682b5ec05" +"checksum fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a772d36c338d07a032d5375a36f15f9a7043bf0cb8ce7cee658e037c6032874" "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.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0bab5b5e94f5c31fc764ba5dd9ad16568aae5d4825538c01d6bca680c9bf94a7" +"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 generic-array 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8107dafa78c80c848b71b60133954b4a58609a3a1a5f9af037ecc7f67280f369" "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 gif 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4bca55ac1f213920ce3527ccd62386f1f15fa3f1714aeee1cf93f2c416903f" "checksum gl 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81457bb802910ad5b535eb48541c51830a761804aa5b7087adbc9d049aa57aca" "checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" "checksum gl_generator_profiling_struct 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6f93e1b0666dae88dda1a2d6fe9fb12f17c0b5551d0621e3d753e2c42fc6c067" -"checksum half 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a581f551b77eb3e177584e922a8c057e14311a857f859fd39d9574d97d3547da" +"checksum half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9353c2a89d550b58fa0061d8ed8d002a7d8cdf2494eb0e432859bd3a9e543836" "checksum harfbuzz-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "87a29ce223fee4727c0c4810a1419a3412f65b29146339fb6a47ee39456c34ea" "checksum harfbuzz_rs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6c0bceea4996a5fbfe0ef74e1f5ab250745075a151bb06c9a73d870ead9cc33b" -"checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37" -"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" -"checksum hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)" = "c4f9b276c87e3fc1902a8bdfcce264c3f7c8a1c35e5e0c946062739f55026664" -"checksum hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c81fa95203e2a6087242c38691a0210f23e9f3f8f944350bd676522132e2985" -"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" +"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" +"checksum hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)" = "34a590ca09d341e94cddf8e5af0bbccde205d5fbc2fa3c09dd67c7f85cea59d7" +"checksum hyper-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ffb1bd5e518d3065840ab315dbbf44e4420e5f7d80e2cb93fa6ffffc50522378" +"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebdff791af04e30089bde8ad2a632b86af433b40c04db8d70ad4b21487db7a6a" "checksum image 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44665b4395d1844c96e7dc8ed5754782a1cdfd9ef458a80bbe45702681450504" "checksum inflate 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6f53b811ee8e2057ccf9643ca6b4277de90efaf5e61e55fd5254576926bb4245" +"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" +"checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" "checksum int_hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "82b10fb1274dcd264c1ca312b5d672dac395f696ebd383833ace2ddec4afe961" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450" -"checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" +"checksum itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0d47946d458e94a1b7bcabbf6521ea7c037062c81f534615abcad76e84d4970d" +"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 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9ef23fcc4059260c5936f638c9805ebfc87cb172fa6661d130cba7f97d58f55" +"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.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" -"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" "checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" -"checksum libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "1e5d97d6708edaa407429faa671b942dc0f2727222fb6b6539bf1db936e4b121" -"checksum libflate 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "1a429b86418868c7ea91ee50e9170683f47fd9d94f5375438ec86ec3adb74e8e" +"checksum libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)" = "10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311" +"checksum libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "21138fc6669f438ed7ae3559d5789a5f0ba32f28c1f0608d1e452b0bb06ee936" +"checksum libm 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "03c0bb6d5ce1b5cc6fd0578ec1cbc18c9d88b5b591a5c7c1d6c6175e266a0819" "checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" -"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54" +"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum lyon_geom 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ee0dc4aec93a8fd9109362bebfbad0ace69b8629937f954ecc8eea1de63146" @@ -2789,141 +3181,169 @@ dependencies = [ "checksum lyon_tessellation 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8449ff06a89995f90e4b6b36f97ef05ae2abcb8227beae9398f542e5a78e1f4" "checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" "checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" -"checksum matrixmultiply 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cac1a66eab356036af85ea093101a14223dc6e3f4c02a59b7d572e5b93270bf7" -"checksum memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a3b4142ab8738a78c51896f704f83c11df047ff1bda9a92a661aa6361552d93d" +"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +"checksum matrixmultiply 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "dcad67dcec2d58ff56f6292582377e6921afdf3bfbd533e26fb8900ae575e002" +"checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16" "checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum metrohash 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3ba553cb19e2acbc54baa16faef215126243fe45e53357a3b2e9f4ebc7b0506c" -"checksum mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e2e00e17be181010a91dbfefb01660b17311059dc8c7f48b9017677721e732bd" +"checksum mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0a907b83e7b9e987032439a387e187119cddafc92d5c2aaeb1d92580a793f630" "checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649" "checksum miniz_oxide 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9ba430291c9d6cedae28bcd2d49d1c32fc57d60cd49086646c5dd5673a870eb5" "checksum miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ad30a47319c16cde58d0314f5d98202a80c9083b5f61178457403dfb14e509c" "checksum miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28edaef377517fd9fe3e085c37d892ce7acd1fbeab9239c5a36eec352d8a8b7e" -"checksum mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7da01a5e23070d92d99b1ecd1cd0af36447c6fd44b0fe283c2db199fa136724f" +"checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" +"checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" +"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 nalgebra 0.16.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0f925f48e18bbd78e76aea47ad2091e919574099552831c2c4802aac65a8f9e7" +"checksum nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c2fa8a0816156fa502b288c19bc3b8a56afe291265189e42259fb9155161bfb6" "checksum nalgebra-glm 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "47e0eb381b2f0c9d84cf11a79029b5d009f9b916499fc234e7f891941c99204c" "checksum native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f74dbadc8b43df7864539cedb7bc91345e532fdd913cfdc23ad94f4d2d40fbc0" -"checksum ncollide3d 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6a5298614cc77f65da238c2af7c0ee5eb2d89e80a6e994c98151c9db1f704bae" -"checksum net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "3a80f842784ef6c9a958b68b7516bc7e35883c614004dd94959a4dca1b716c09" -"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" +"checksum ncollide3d 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f827e93fd0fa1592e047ddde917314bf03b48fc817ab4ebed0274fc99aea7d45" +"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" +"checksum notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "873ecfd8c174964ae30f401329d140142312c8e5590719cf1199d5f1717d8078" "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" -"checksum num-complex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68de83578789e0fbda3fa923035be83cf8bfd3b30ccfdecd5aa89bf8601f408e" -"checksum num-derive 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d2c31b75c36a993d30c7a13d70513cb93f02acafdd5b7ba250f9b0e18615de7" +"checksum num-complex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "107b9be86cd2481930688277b675b0114578227f034674726605b8a482d8baf8" +"checksum num-derive 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8af1847c907c2f04d7bfd572fb25bbb4385c637fe5be163cf2f8c5d778fe1e7d" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" -"checksum num-iter 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "4b226df12c5a59b63569dd57fafb926d91b385dfce33d8074a412411b689d593" +"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.5 (registry+https://github.com/rust-lang/crates.io-index)" = "630de1ef5cc79d0cdd78b7e33b81f083cbfe90de0f4b2b2f07f905867c70e9fe" +"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 objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9833ab0efe5361b1e2122a0544a5d3359576911a42cb098c2e59be8650807367" "checksum once_cell 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d7ce3535d54560c937c1652ba4a0da66bfc63e0f8e07bed127483afb6e5ee925" "checksum onig 4.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3febe8cb22362af9e662c9c35e4d8a675de50b1b119823aa556892ac967fb776" "checksum onig_sys 69.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "78c04019a39ebac42dfd8c7822af0a009043720845a812ddbb95e403298b0183" "checksum opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" -"checksum openssl 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)" = "169a4b9160baf9b9b1ab975418c673686638995ba921683a7f1e01470dcb8854" -"checksum openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "14ba54ac7d5a4eabd1d5f2c1fdeb7e7c14debfa669d94b983d01b465e767ba9e" +"checksum openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985" +"checksum openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)" = "278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106" "checksum ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2f0015e9e8e28ee20c581cfbfe47c650cedeb9ed0721090e0b7ebb10b9cdbcc2" -"checksum parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "69376b761943787ebd5cc85a5bc95958651a22609c5c1c2b65de21786baec72b" -"checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" +"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" +"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_shared 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "b539898d22d4273ded07f64a05737649dc69095d92cb87c7097ec68e3f150b93" -"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" +"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum plist 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c7316832d9ac5da02786bdc89a3faf0ca07070212b388766e969078fd593edc" "checksum png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f54b9600d584d3b8a739e1662a595fab051329eff43f20e7d8cc22872962145b" -"checksum proc-macro2 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)" = "295af93acfb1d5be29c16ca5b3f82d863836efd9cb0c14fd83811eb9a110e452" +"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" +"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" -"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" -"checksum rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "12397506224b2f93e6664ffc4f664b29be8208e5157d3d90b44f09b5fae470ea" -"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2" +"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 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a" +"checksum rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "771b009e3a508cb67e8823dda454aaa5368c7bc1c16829fb77d3e980440dd34a" +"checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" +"checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" +"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" +"checksum rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "effa3fcaa47e18db002bdde6060944b6d2f9cfd8db471c30e873448ad9187be3" "checksum rawpointer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebac11a9d2e11f2af219b8b8d833b76b1ea0e054aa0e8d8e9e4cbde353bdf019" -"checksum rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "df7a791f788cb4c516f0e091301a29c2b71ef680db5e644a7d68835c8ae6dbfa" +"checksum rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "373814f27745b2686b350dd261bfd24576a6fb0e2c5919b3a2b6005f820b0473" "checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" "checksum rctree 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1817e0f0056f95bce0d6ab1a5be62ca24bd756b5547c20637ef47cc9a2065f4b" -"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" +"checksum redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "679da7508e9a6390aeaf7fbd02a800fdc64b73fe2204dd2c8ae66d22d9d5ad5d" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "214a97e49be64fd2c86f568dd0cb2c757d2cc53de95b273b6ad0a1c908482f26" -"checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341" -"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" +"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" +"checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1" "checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a" -"checksum remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d2f806b0fcdabd98acd380dc8daef485e22bcb7cddc811d1337967f2528cf5" +"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum reqwest 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5866613d84e2a39c0479a960bf2d0eff1fbfc934f02cd42b5c08c1e1efc5b1fd" "checksum roxmltree 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "deb79f6167fd05bc84f9aee9988297a47aedc8105de51d1e5f68fa43215aebf7" -"checksum rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aee45432acc62f7b9a108cc054142dac51f979e69e71ddce7d6fc7adf29e817e" -"checksum rusttype 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b8eb11f5b0a98c8eca2fb1483f42646d8c340e83e46ab416f8a063a0fd0eeb20" -"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" -"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637" -"checksum schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "acece75e0f987c48863a6c792ec8b7d6c4177d4a027f8ccc72f849794f437016" -"checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d" +"checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" +"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +"checksum rusttype 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "436c67ae0d0d24f14e1177c3ed96780ee16db82b405f0fba1bb80b46c9a30625" +"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" +"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" +"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" +"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" +"checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" "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.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "dfa44ee9c54ce5eecc9de7d5acbad112ee58755239381f687e564004ba4a2332" "checksum security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "5421621e836278a0b139268f36eee0dc7e389b784dc3f79d8f11aabadf41bead" +"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.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" "checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" -"checksum serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c9db7266c7d63a4c4b7fe8719656ccdd51acf1bed6124b174f933b009fb10bcb" -"checksum serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce0fd303af908732989354c6f02e05e2e6d597152870f2c6990efb0577137480" +"checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811" +"checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" "checksum servo-fontconfig 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a088f8d775a5c5314aae09bd77340bc9c67d72b9a45258be34c83548b4814cd9" "checksum servo-fontconfig-sys 4.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b46d201addcfbd25c1798ad1281d98c40743824e0b0f1e611bd3d5d0d31a7b8d" "checksum servo-freetype-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d00ab791f66cd2ec58e72c91b6076cee20fac560463aa871404eb31dfc9c4ff" -"checksum sha-1 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfd94fe9ed1245c2a1459f99373217b131a1b32b6d0922988b1e45b35249249" +"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" "checksum sid 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "29e0a6006cf04d568a49363baca3dabddbbe46538f7c76692d405f5f5d140ecd" "checksum simplecss 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "135685097a85a64067df36e28a243e94a94f76d829087ce0be34eeb014260c0e" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" -"checksum slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdeff4cd9ecff59ec7e3744cbca73dfe5ac35c2aedb2cfba8a1c715a18912e9d" +"checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" "checksum slotmap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "759fd553261805f128e2900bf69ab3d034260bc338caf7f0ee54dbf035c85acd" "checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" -"checksum smallvec 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "211a489e65e94b103926d2054ae515a1cdb5d515ea0ef414fee23b7e043ce748" +"checksum smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ea3738b47563803ef814925e69be00799a8c07420be8b996f8e98fb2336db" +"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum stb_truetype 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "48fa7d3136d8645909de1f7c7eb5416cc43057a75ace08fc39ae736bc9da8af1" "checksum svgdom 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc4610cb63ef2e0f835dcc3f09474f59d3df96d251f27bfc1fd3d9807d54d149" "checksum svgtypes 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d7da116a3aedb07023f8399e126d0467bd9629d3a235f339eb7986f779a07c9" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4e4b5274d4a0a3d2749d5c158dc64d3403e60554dc61194648787ada5212473d" -"checksum syn 0.15.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4439ee8325b4e4b57e59309c3724c9a4478eaeb4eb094b6f3fac180a3b2876" +"checksum syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8b29eb5210bc5cf63ed6149cbf9adfc82ac0be023d8735c176ee74a2db4da7" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" -"checksum synstructure 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ec37f4fab4bafaf6b5621c1d54e6aa5d4d059a8f84929e87abfdd7f9f04c6db2" +"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum syntect 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e02dd9df97a68a2d005ace28ff24c610abfc3ce17afcfdb22a077645dabb599a" "checksum take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" -"checksum tar 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)" = "1605d3388ceb50252952ffebab4b5dc43017ead7e4481b175961c283bb951195" -"checksum tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f73eebdb68c14bcb24aef74ea96079830e7fa7b31a6106e42ea7ee887c1e134e" +"checksum tar 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "a303ba60a099fcd2aaa646b14d2724591a96a75283e4b7ed3d1a1658909d9ae2" +"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum tiff 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a2cc6c4fd13cb1cfd20abdb196e794ceccb29371855b7e7f575945f920a5b3c2" -"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" +"checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" "checksum tobj 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c5eb0cdeabef6fcefb92c6dcb8571ba1880d36eb608da4f9cf62673765eadc31" -"checksum tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "52b4e32d8edbf29501aabb3570f027c6ceb00ccef6538f4bddba0200503e74e8" -"checksum tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b9532748772222bf70297ec0e2ad0f17213b4a7dd0e6afb68e0a0768f69f4e4f" +"checksum tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "a7817d4c98cc5be21360b3b37d6036fe9b7aefa5b7a201b7b16ff33423822f7d" +"checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" +"checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" +"checksum tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "331c8acc267855ec06eb0c94618dcbbfea45bed2d20b77252940095273fb58f6" +"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-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" +"checksum tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "502b625acb4ee13cbb3b90b8ca80e0addd263ddacf6931666ef751e610b07fb5" "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" +"checksum tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad235e9dadd126b2d47f6736f65aa1fdcd6420e66ca63f44177bc78df89f912" +"checksum tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "56c5556262383032878afad66943926a1d1f0967f17e94bd7764ceceb3b70e7f" +"checksum tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4f37f0111d76cc5da132fe9bc0590b9b9cfd079bc7e75ac3846278430a299ff8" "checksum tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "772f4b04e560117fe3b0a53e490c16ddc8ba6ec437015d91fa385564996ed913" +"checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" +"checksum tokio-uds 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "99ce87382f6c1a24b513a72c048b2c8efe66cb5161c9061d00bee510f08dc168" +"checksum try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2aa4715743892880f70885373966c83d73ef1b0838a664ef0c76fffd35e7c2" "checksum twox-hash 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4f85be565a110ed72ed7048cf56570db04ce0a592c98aa59b7dacde3e5718750" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" -"checksum ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d0f8bfa9ff0cadcd210129ad9d2c5f145c13e9ced3d3e5d948a6213487d52444" -"checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a" +"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" +"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.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" +"checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "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.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa35e768d4daf1d85733418a49fb42e10d7f633e394fccab4ab7aba897053fe2" +"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum usvg 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ae701afa1544f8e096f1da8aeac65594f9dfd872c65ea0ecb2c6827578d52eb" "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" -"checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" +"checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" "checksum vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef3c4d87f97be129e5e240a49efd7d129a965e5b6acdf8364725b0a894138be" -"checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" +"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 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b167e9a4420d8dddb260e70c90a4a375a1e5691f21f70e715553da87b6c2503a" +"checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" +"checksum want 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a05d9d966753fa4b5c8db73fcab5eed4549cfe0e1e4e66911e5564a0085c35d1" "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" @@ -2932,7 +3352,7 @@ dependencies = [ "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "5f04de8a1346489a2f9e9bd8526b73d135ec554227b17568456e86aa35b6f3fc" +"checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" "checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" "checksum xmlparser 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ea75f29e9916cc12af3af844a59d2d2ba1ca33aa956e9a162240dc7124cc72bb" "checksum yaml-rust 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "95acf0db5515d07da9965ec0e0ba6cc2d825e2caeb7303b66ca441729801254e" diff --git a/lesson-24-x-text/src/main.rs b/lesson-24-x-text/src/main.rs index ebd951a..85b154c 100644 --- a/lesson-24-x-text/src/main.rs +++ b/lesson-24-x-text/src/main.rs @@ -48,8 +48,7 @@ fn run() -> Result<(), failure::Error> { "core", 0, resources::backend::FileSystem::from_rel_path(env!("CARGO_MANIFEST_DIR"), "core") - .with_write() - .with_watch(), + .with_write(), ); let sdl = sdl2::init().map_err(err_msg)?; diff --git a/lesson-25-x-terrain/Cargo.toml b/lesson-25-x-terrain/Cargo.toml index 412e183..81ff14b 100644 --- a/lesson-25-x-terrain/Cargo.toml +++ b/lesson-25-x-terrain/Cargo.toml @@ -5,6 +5,7 @@ authors = ["Nerijus Arlauskas "] edition = "2018" [dependencies] +resources = { path = "../lib/resources", features = ["backend_filesystem_watch"] } gl = { path = "../lib/gl" } failure = "0.1.3" env_logger = "*" diff --git a/lesson-25-x-terrain/core/shaders/quad.frag b/lesson-25-x-terrain/core/shaders/quad.frag new file mode 100644 index 0000000..dbc71c2 --- /dev/null +++ b/lesson-25-x-terrain/core/shaders/quad.frag @@ -0,0 +1,13 @@ +#version 330 core + +in VS_OUTPUT { + vec4 Color; +} IN; + +out vec4 Color; + +void main() +{ + + Color = IN.Color; +} \ No newline at end of file diff --git a/lesson-25-x-terrain/core/shaders/quad.vert b/lesson-25-x-terrain/core/shaders/quad.vert new file mode 100644 index 0000000..3b4b26b --- /dev/null +++ b/lesson-25-x-terrain/core/shaders/quad.vert @@ -0,0 +1,17 @@ +#version 330 core + +layout (location = 0) in vec3 Position; +layout (location = 1) in vec4 Color; + +uniform mat4 ViewProjection; +uniform mat4 Model; + +out VS_OUTPUT { + vec4 Color; +} OUT; + +void main() +{ + gl_Position = ViewProjection * Model * vec4(Position, 1.0); + OUT.Color = Color; +} \ No newline at end of file diff --git a/lesson-25-x-terrain/src/main.rs b/lesson-25-x-terrain/src/main.rs index 389fb69..fed7052 100644 --- a/lesson-25-x-terrain/src/main.rs +++ b/lesson-25-x-terrain/src/main.rs @@ -1,6 +1,11 @@ use log::*; +use resources::{ + Resources, + backend::FileSystem +}; mod debug; +mod onion; fn main() { debug::init_logging(); @@ -11,6 +16,24 @@ fn main() { } fn run() -> Result<(), failure::Error> { - info!("hello"); + let resources = Resources::new().loaded_from( + "core", + 0, + FileSystem::from_rel_path(env!("CARGO_MANIFEST_DIR"), "core") + .with_write(), + ); + + let res = resources.resource("shaders/quad.frag"); + + loop { + if let Some(p) = resources.new_changes() { + println!("res: {}", String::from_utf8_lossy(&res.get().unwrap())); + resources.notify_changes_synced(p); + } + + let mut v = String::new(); + ::std::io::stdin().read_line(&mut v).unwrap(); + } + Ok(()) } \ No newline at end of file diff --git a/lesson-25-x-terrain/src/onion.rs b/lesson-25-x-terrain/src/onion.rs new file mode 100644 index 0000000..e69de29 diff --git a/lib/resources/Cargo.toml b/lib/resources/Cargo.toml index b0e714a..9166bd6 100644 --- a/lib/resources/Cargo.toml +++ b/lib/resources/Cargo.toml @@ -8,6 +8,7 @@ default = [] backend_in_memory = [] backend_miniz = ["miniz_oxide"] backend_filesystem = [] +backend_filesystem_watch = ["backend_filesystem", "notify"] [dependencies] failure = "0.1.3" @@ -15,6 +16,7 @@ slab = "0.4" twox-hash = "1.1" miniz_oxide = { version = "0.1", optional = true } +notify = { version = "4.0.0", optional = true } [dev-dependencies] miniz_oxide = "0.1" \ No newline at end of file diff --git a/lib/resources/src/backend/filesystem.rs b/lib/resources/src/backend/filesystem.rs index 1915e0a..ae1d22c 100644 --- a/lib/resources/src/backend/filesystem.rs +++ b/lib/resources/src/backend/filesystem.rs @@ -6,6 +6,7 @@ use crate::{Error, ResourcePath}; pub struct FileSystem { root_path: PathBuf, can_write: bool, + #[cfg(feature = "backend_filesystem_watch")] watch: bool, } @@ -17,6 +18,7 @@ impl FileSystem { FileSystem::from_path(resource_name_to_path(root_path.as_ref(), rel_path.as_ref())) } + #[cfg(feature = "backend_filesystem_watch")] pub fn from_path>(root_path: P) -> FileSystem { FileSystem { root_path: root_path.as_ref().into(), @@ -25,11 +27,20 @@ impl FileSystem { } } + #[cfg(not(feature = "backend_filesystem_watch"))] + pub fn from_path>(root_path: P) -> FileSystem { + FileSystem { + root_path: root_path.as_ref().into(), + can_write: false, + } + } + pub fn with_write(mut self) -> Self { self.can_write = true; self } + #[cfg(feature = "backend_filesystem_watch")] pub fn with_watch(mut self) -> Self { self.watch = true; self From 651595489f8416c814d2a645da22e24c32defde1 Mon Sep 17 00:00:00 2001 From: Nerijus Arlauskas Date: Sun, 2 Dec 2018 02:16:15 +0200 Subject: [PATCH 3/8] Convert resource path to filesystem path and vice versa --- Cargo.lock | 1 + lib/resources/Cargo.toml | 1 + lib/resources/src/backend/filesystem.rs | 61 +- lib/resources/src/lib.rs | 5 + lib/resources/src/path.rs | 702 ++++++++++++++++++++++++ 5 files changed, 757 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4b635af..10ecfd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2180,6 +2180,7 @@ name = "resources" version = "0.1.0" dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/lib/resources/Cargo.toml b/lib/resources/Cargo.toml index 9166bd6..aa5b33c 100644 --- a/lib/resources/Cargo.toml +++ b/lib/resources/Cargo.toml @@ -14,6 +14,7 @@ backend_filesystem_watch = ["backend_filesystem", "notify"] failure = "0.1.3" slab = "0.4" twox-hash = "1.1" +log = "0.4.6" miniz_oxide = { version = "0.1", optional = true } notify = { version = "4.0.0", optional = true } diff --git a/lib/resources/src/backend/filesystem.rs b/lib/resources/src/backend/filesystem.rs index ae1d22c..51605f6 100644 --- a/lib/resources/src/backend/filesystem.rs +++ b/lib/resources/src/backend/filesystem.rs @@ -2,12 +2,56 @@ use crate::backend::{Backend, BackendSyncPoint}; use std::path::{Path, PathBuf}; use std::{fs, io}; use crate::{Error, ResourcePath}; +use std::sync::Mutex; + +#[cfg(feature = "backend_filesystem_watch")] +mod watch_impl { + use std::path::{Path, PathBuf}; + use std::sync::mpsc::{channel, Receiver}; + use std::time::Duration; + use notify::{RecommendedWatcher, Watcher as NotifyWatcher, RecursiveMode, DebouncedEvent}; + + pub struct Watcher { + root_path: PathBuf, + watcher: RecommendedWatcher, + receiver: Receiver, + } + + impl Watcher { + pub fn new(root_path: &Path) -> Option { + let (tx, rx) = channel(); + + let mut watcher: RecommendedWatcher = NotifyWatcher::new(tx, Duration::from_secs(2)) + .map_err(|e| error!("faled to create watcher for {:?}", root_path)) + .ok()?; + watcher.watch(root_path, RecursiveMode::Recursive).ok()?; + + Some(Watcher { + root_path: root_path.into(), + watcher, + receiver: rx, + }) + } + } +} + +#[cfg(not(feature = "backend_filesystem_watch"))] +mod watch_impl { + use std::path::{Path}; + + pub struct Watcher {} + + impl Watcher { + pub fn new(_root_path: &Path) -> Option { + None + } + } +} pub struct FileSystem { root_path: PathBuf, can_write: bool, - #[cfg(feature = "backend_filesystem_watch")] - watch: bool, + watch: Option>, } impl FileSystem { @@ -18,20 +62,11 @@ impl FileSystem { FileSystem::from_path(resource_name_to_path(root_path.as_ref(), rel_path.as_ref())) } - #[cfg(feature = "backend_filesystem_watch")] - pub fn from_path>(root_path: P) -> FileSystem { - FileSystem { - root_path: root_path.as_ref().into(), - can_write: false, - watch: false, - } - } - - #[cfg(not(feature = "backend_filesystem_watch"))] pub fn from_path>(root_path: P) -> FileSystem { FileSystem { root_path: root_path.as_ref().into(), can_write: false, + watch: None, } } @@ -42,7 +77,7 @@ impl FileSystem { #[cfg(feature = "backend_filesystem_watch")] pub fn with_watch(mut self) -> Self { - self.watch = true; + self.watch = watch_impl::Watcher::new(&self.root_path).map(|v| Mutex::new(v)); self } } diff --git a/lib/resources/src/lib.rs b/lib/resources/src/lib.rs index c82110e..bdb95f9 100644 --- a/lib/resources/src/lib.rs +++ b/lib/resources/src/lib.rs @@ -2,6 +2,11 @@ extern crate failure; extern crate slab; extern crate twox_hash; +#[macro_use] +extern crate log; + +#[cfg(feature = "backend_filesystem_watch")] +extern crate notify; mod path; diff --git a/lib/resources/src/path.rs b/lib/resources/src/path.rs index 8179166..76c69c0 100644 --- a/lib/resources/src/path.rs +++ b/lib/resources/src/path.rs @@ -1,3 +1,11 @@ +/*! + +Resource path implementation. + +Universal resource path help to query resources the same way across different platforms and backends. + +*/ + #[derive(Clone, Hash, Eq, PartialEq, Ord, PartialOrd)] pub struct ResourcePathBuf { inner: String, @@ -121,6 +129,29 @@ impl ResourcePath { inner: [left, "/", right].concat(), } } + + pub fn to_filesystem_path(&self, root_dir: &::std::path::Path) -> ::std::path::PathBuf { + let mut path: ::std::path::PathBuf = root_dir.into(); + + for part in self.items() { + path = path.join(sanitize_path_component(part).as_ref()); + } + + path + } +} + +impl ResourcePathBuf { + pub fn from_filesystem_path(root_dir: &::std::path::Path, path: &::std::path::Path) -> Option { + let relative_dir = path.strip_prefix(root_dir).ok()?; + + let mut path = ResourcePathBuf { inner: String::with_capacity(relative_dir.as_os_str().len() + 32) }; + for part in relative_dir.components() { + path = path.join(unsanitize_path_component(part.as_os_str()).as_ref()); + } + + Some(path) + } } // ---- Formatting ---- @@ -150,3 +181,674 @@ impl fmt::Display for ResourcePathBuf { fmt::Display::fmt(&self.inner, f) } } + +// ---- Other utils --- + +use std::borrow::Cow; + +struct FixSolution<'s> { + problematic_sequence_len: usize, + fix: FixOutput<'s>, +} + +enum FixOutput<'s> { + /// Insert a slice to the byt output + Single(&'s [u8]), + /// Insert 3 slices to byte output + Triple(&'s [u8], &'s [u8], &'s [u8]), +} + +/// Check if the subsequent string requires a fix +/// +/// The fixes here should be reversible. It should be possible to reconstruct the +/// resource name from the sanitized output. +fn check_for_sanitize_fix(previous_len: usize, remainder: &[u8]) -> Option { + let next_char = remainder[0]; + + if previous_len == 0 && remainder.len() >= 3 { + match next_char { + b'C' | b'c' => { + let c1 = remainder[1].to_ascii_lowercase(); + let c2 = remainder[2].to_ascii_lowercase(); + let c3 = remainder.iter().skip(3).next().cloned(); + let c4 = remainder.iter().skip(4).next().cloned(); + + match (c1, c2, c3, c4) { + (b'o', b'n', None, None) => { + return Some(FixSolution { + problematic_sequence_len: 3, + fix: FixOutput::Triple(b"_r", remainder, b"_"), + }) + } + (b'o', b'n', Some(b'.'), _) => { + return Some(FixSolution { + problematic_sequence_len: 3, + fix: FixOutput::Triple(b"_r", &remainder[..3], b"_"), + }) + } + (b'o', b'm', Some(b'1'...b'9'), None) => { + return Some(FixSolution { + problematic_sequence_len: 4, + fix: FixOutput::Triple(b"_r", remainder, b"_"), + }) + } + (b'o', b'm', Some(b'1'...b'9'), Some(b'.')) => { + return Some(FixSolution { + problematic_sequence_len: 4, + fix: FixOutput::Triple(b"_r", &remainder[..4], b"_"), + }) + } + _ => (), + } + } + b'P' | b'p' => { + let c1 = remainder[1].to_ascii_lowercase(); + let c2 = remainder[2].to_ascii_lowercase(); + let c3 = remainder.iter().skip(3).next().cloned(); + + match (c1, c2, c3) { + (b'r', b'n', None) => { + return Some(FixSolution { + problematic_sequence_len: 3, + fix: FixOutput::Triple(b"_r", remainder, b"_"), + }) + } + (b'r', b'n', Some(b'.')) => { + return Some(FixSolution { + problematic_sequence_len: 3, + fix: FixOutput::Triple(b"_r", &remainder[..3], b"_"), + }) + } + _ => (), + } + } + b'A' | b'a' => { + let c1 = remainder[1].to_ascii_lowercase(); + let c2 = remainder[2].to_ascii_lowercase(); + let c3 = remainder.iter().skip(3).next().cloned(); + + match (c1, c2, c3) { + (b'u', b'x', None) => { + return Some(FixSolution { + problematic_sequence_len: 3, + fix: FixOutput::Triple(b"_r", remainder, b"_"), + }) + } + (b'u', b'x', Some(b'.')) => { + return Some(FixSolution { + problematic_sequence_len: 3, + fix: FixOutput::Triple(b"_r", &remainder[..3], b"_"), + }) + } + _ => (), + } + } + b'N' | b'n' => { + let c1 = remainder[1].to_ascii_lowercase(); + let c2 = remainder[2].to_ascii_lowercase(); + let c3 = remainder.iter().skip(3).next().cloned(); + + match (c1, c2, c3) { + (b'u', b'l', None) => { + return Some(FixSolution { + problematic_sequence_len: 3, + fix: FixOutput::Triple(b"_r", remainder, b"_"), + }) + } + (b'u', b'l', Some(b'.')) => { + return Some(FixSolution { + problematic_sequence_len: 3, + fix: FixOutput::Triple(b"_r", &remainder[..3], b"_"), + }) + } + _ => (), + } + } + b'L' | b'l' if remainder.len() >= 4 => { + let c1 = remainder[1].to_ascii_lowercase(); + let c2 = remainder[2].to_ascii_lowercase(); + let c3 = remainder[3]; + let c4 = remainder.iter().skip(4).next().cloned(); + + match (c1, c2, c3, c4) { + (b'p', b't', b'1'...b'9', None) => { + return Some(FixSolution { + problematic_sequence_len: 4, + fix: FixOutput::Triple(b"_r", remainder, b"_"), + }) + } + (b'p', b't', b'1'...b'9', Some(b'.')) => { + return Some(FixSolution { + problematic_sequence_len: 4, + fix: FixOutput::Triple(b"_r", &remainder[..4], b"_"), + }) + } + _ => (), + } + } + _ => (), + } + } + + match next_char { + b'\\' => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_b_"), + }), + b'_' => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"__"), + }), + b'<' => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_lt_"), + }), + b'>' => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_gt_"), + }), + b':' => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_c_"), + }), + b'\"' => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_q_"), + }), + b'/' => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_sl_"), + }), + b'|' => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_p_"), + }), + b'?' => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_m_"), + }), + b'*' => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_a_"), + }), + i @ 1..=31 => Some(FixSolution { + problematic_sequence_len: 1, + fix: match i { + 1 => FixOutput::Single(b"_i1_"), + 2 => FixOutput::Single(b"_i2_"), + 3 => FixOutput::Single(b"_i3_"), + 4 => FixOutput::Single(b"_i4_"), + 5 => FixOutput::Single(b"_i5_"), + 6 => FixOutput::Single(b"_i6_"), + 7 => FixOutput::Single(b"_i7_"), + 8 => FixOutput::Single(b"_i8_"), + 9 => FixOutput::Single(b"_i9_"), + 10 => FixOutput::Single(b"_i10_"), + 11 => FixOutput::Single(b"_i11_"), + 12 => FixOutput::Single(b"_i12_"), + 13 => FixOutput::Single(b"_i13_"), + 14 => FixOutput::Single(b"_i14_"), + 15 => FixOutput::Single(b"_i15_"), + 16 => FixOutput::Single(b"_i16_"), + 17 => FixOutput::Single(b"_i17_"), + 18 => FixOutput::Single(b"_i18_"), + 19 => FixOutput::Single(b"_i19_"), + 20 => FixOutput::Single(b"_i20_"), + 21 => FixOutput::Single(b"_i21_"), + 22 => FixOutput::Single(b"_i22_"), + 23 => FixOutput::Single(b"_i23_"), + 24 => FixOutput::Single(b"_i24_"), + 25 => FixOutput::Single(b"_i25_"), + 26 => FixOutput::Single(b"_i26_"), + 27 => FixOutput::Single(b"_i27_"), + 28 => FixOutput::Single(b"_i28_"), + 29 => FixOutput::Single(b"_i29_"), + 30 => FixOutput::Single(b"_i30_"), + 31 => FixOutput::Single(b"_i31_"), + _ => unreachable!("should be in range 1 - 31"), + }, + }), + b'.' if remainder.len() == 1 => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_d_"), + }), + b' ' if remainder.len() == 1 => Some(FixSolution { + problematic_sequence_len: 1, + fix: FixOutput::Single(b"_s_"), + }), + _ => None, + } +} + +enum SanitizeState { + /// Nothing was encountered that would need fixing + Good { position: usize }, + /// Something was fixed, and the buffer for fixes was allocated + Fixed { buffer: Vec }, +} + +/// Apply the fix based on previous sanitization state and fix output that was returned from requires_sanitize_fix +fn apply_sanitize_fix( + problematic_sequence_len: usize, + replacement: FixOutput, + remainder: &mut &[u8], + state: SanitizeState, + all_bytes: &[u8], +) -> SanitizeState { + match state { + SanitizeState::Fixed { mut buffer } => { + match replacement { + FixOutput::Single(replacement) => buffer.extend_from_slice(replacement), + FixOutput::Triple(a, b, c) => { + buffer.extend_from_slice(a); + buffer.extend_from_slice(b); + buffer.extend_from_slice(c); + } + } + *remainder = &remainder[problematic_sequence_len..]; + SanitizeState::Fixed { buffer } + } + SanitizeState::Good { position } => { + let mut buffer = Vec::with_capacity(1024); + buffer.extend_from_slice(&all_bytes[..position]); + match replacement { + FixOutput::Single(replacement) => buffer.extend_from_slice(replacement), + FixOutput::Triple(a, b, c) => { + buffer.extend_from_slice(a); + buffer.extend_from_slice(b); + buffer.extend_from_slice(c); + } + } + *remainder = &remainder[problematic_sequence_len..]; + SanitizeState::Fixed { buffer } + } + } +} + +/// Create a version of path string that is safe to use as filesystem path component, +/// provided that it is not empty. +pub fn sanitize_path_component(component: &str) -> Cow { + let bytes = component.as_bytes(); + let mut remainder = bytes; + let mut state = SanitizeState::Good { position: 0 }; + + 'main: loop { + state = match state { + SanitizeState::Good { .. } => { + let mut index = 0; + loop { + if remainder.len() == 0 { + return Cow::from(component); + } + + if let Some(s) = check_for_sanitize_fix(index, remainder) { + state = apply_sanitize_fix( + s.problematic_sequence_len, + s.fix, + &mut remainder, + SanitizeState::Good { position: index }, + bytes, + ); + continue 'main; + } + + index += 1; + remainder = &remainder[1..]; + } + } + SanitizeState::Fixed { mut buffer } => { + if remainder.len() == 0 { + return Cow::from( + String::from_utf8(buffer).expect("expected valid utf8 sequence"), + ); + } + + if let Some(s) = check_for_sanitize_fix(buffer.len(), remainder) { + apply_sanitize_fix( + s.problematic_sequence_len, + s.fix, + &mut remainder, + SanitizeState::Fixed { buffer }, + bytes, + ) + } else { + buffer.extend_from_slice(&remainder[..1]); + remainder = &remainder[1..]; + SanitizeState::Fixed { buffer } + } + } + }; + } +} + +use std::ffi::OsStr; + +pub fn unsanitize_path_component(component: &OsStr) -> Cow { + #[derive(Copy, Clone)] + enum FixState { + Underscore, + Scan, + } + + enum UnsanitizeState { + Fixed { bytes: Vec, state: FixState, position: usize }, + ReuseSameString, + } + + let part = component.to_string_lossy(); + + if part.len() == 0 { + return part; + } + + let state = { + let bytes = part.as_ref().as_bytes(); + let bytes_len = bytes.len(); + + let mut position = 0; + + loop { + if bytes[position] == b'_' { + let mut ok_data = Vec::with_capacity(bytes_len); + ok_data.extend(bytes.iter().take(position)); + break UnsanitizeState::Fixed { bytes: ok_data, state: FixState::Underscore, position: position + 1 }; + } + position += 1; + if position >= bytes_len { + break UnsanitizeState::ReuseSameString; + } + } + }; + + match state { + UnsanitizeState::ReuseSameString => return part, + UnsanitizeState::Fixed { mut bytes, mut state, mut position } => { + let src_bytes = part.as_ref().as_bytes(); + let src_bytes_len = src_bytes.len(); + + loop { + match state { + FixState::Underscore => { + let remaining_len = src_bytes_len - position; + + if remaining_len == 0 { + bytes.push(b'_'); // invalid file + break; + } + + let next_char = src_bytes[position]; + + if remaining_len > 0 && next_char == b'_' { + bytes.push(b'_'); + position += 1; + state = FixState::Scan; + } else if remaining_len > 4 && next_char == b'r' && src_bytes[position + 4] == b'_' { + bytes.extend_from_slice(&src_bytes[position + 1..position + 4]); + position += 5; + state = FixState::Scan; + } else if remaining_len > 5 && next_char == b'r' && src_bytes[position + 5] == b'_' { + bytes.extend_from_slice(&src_bytes[position + 1..position + 5]); + position += 6; + state = FixState::Scan; + } else if remaining_len > 2 && next_char == b'i' { + let next_char2 = src_bytes[position + 1]; + let next_char3 = src_bytes[position + 2]; + + match (next_char2, next_char3) { + (b'1', b'_') => bytes.push(1), + (b'2', b'_') => bytes.push(2), + (b'3', b'_') => bytes.push(3), + (b'4', b'_') => bytes.push(4), + (b'5', b'_') => bytes.push(5), + (b'6', b'_') => bytes.push(6), + (b'7', b'_') => bytes.push(7), + (b'8', b'_') => bytes.push(8), + (b'9', b'_') => bytes.push(9), + _ => if remaining_len > 3 { + let next_char4 = src_bytes[position + 3]; + + match (next_char2, next_char3, next_char4) { + (b'1', b'0', b'_') => bytes.push(10), + (b'1', b'1', b'_') => bytes.push(11), + (b'1', b'2', b'_') => bytes.push(12), + (b'1', b'3', b'_') => bytes.push(13), + (b'1', b'4', b'_') => bytes.push(14), + (b'1', b'5', b'_') => bytes.push(15), + (b'1', b'6', b'_') => bytes.push(16), + (b'1', b'7', b'_') => bytes.push(17), + (b'1', b'8', b'_') => bytes.push(18), + (b'1', b'9', b'_') => bytes.push(19), + (b'2', b'0', b'_') => bytes.push(20), + (b'2', b'1', b'_') => bytes.push(21), + (b'2', b'2', b'_') => bytes.push(22), + (b'2', b'3', b'_') => bytes.push(23), + (b'2', b'4', b'_') => bytes.push(24), + (b'2', b'5', b'_') => bytes.push(25), + (b'2', b'6', b'_') => bytes.push(26), + (b'2', b'7', b'_') => bytes.push(27), + (b'2', b'8', b'_') => bytes.push(28), + (b'2', b'9', b'_') => bytes.push(29), + (b'3', b'0', b'_') => bytes.push(30), + (b'3', b'1', b'_') => bytes.push(31), + _ => { + bytes.push(b'_'); + bytes.extend_from_slice(&src_bytes[position..]); // invalid file + break; + }, + } + + position += 1; + }, + } + + position += 3; + state = FixState::Scan; + } else if remaining_len > 1 { + let next_char2 = src_bytes[position + 1]; + + match (next_char, next_char2) { + (b'd', b'_') => bytes.push(b'.'), + (b'b', b'_') => bytes.push(b'\\'), + (b'c', b'_') => bytes.push(b':'), + (b'q', b'_') => bytes.push(b'\"'), + (b'p', b'_') => bytes.push(b'|'), + (b'm', b'_') => bytes.push(b'?'), + (b'a', b'_') => bytes.push(b'*'), + (b's', b'_') => bytes.push(b' '), + _ => if remaining_len > 2 { + let next_char3 = src_bytes[position + 2]; + + match (next_char, next_char2, next_char3) { + (b'l', b't', b'_') => bytes.push(b'<'), + (b'g', b't', b'_') => bytes.push(b'>'), + (b's', b'l', b'_') => bytes.push(b'/'), + _ => { + bytes.push(b'_'); + bytes.extend_from_slice(&src_bytes[position..]); // invalid file + }, + } + + position += 1; + }, + } + + position += 2; + state = FixState::Scan; + } else { + bytes.push(b'_'); + bytes.extend_from_slice(&src_bytes[position..]); // invalid file + break; + } + }, + FixState::Scan => { + if position == src_bytes_len { + break; + } + + let next_char = src_bytes[position]; + + if next_char == b'_' { + state = FixState::Underscore; + } else { + bytes.push(next_char); + } + + position += 1; + } + } + } + + Cow::from(String::from_utf8(bytes).expect("bytes already undergone lossy conversion to utf8")) + } + } +} + +#[cfg(test)] +mod normalize_path_tests { + use super::{sanitize_path_component, unsanitize_path_component}; + use std::ffi::OsString; + + fn check(sanitized: &str, unsanitized: &str) { + assert_eq!(sanitized, sanitize_path_component(unsanitized).as_ref()); + assert_eq!(unsanitized, unsanitize_path_component(&OsString::from(sanitized)).as_ref()); + } + + #[test] + fn test_common() { + // this is not valid path, but not a concern of this function + check("", ""); + + // _ is the start of the escape sequence, so this escapes the escape sequence + check("__", "_"); + check("____", "__"); + + // kill path traversing + check("_d_", "."); + check("._d_", ".."); + + // simple unsanitized names + check("hello world", "hello world"); + check("hello-world", "hello-world"); + check("hello+world", "hello+world"); + } + + #[test] + fn test_windows() { + check("_b_", "\\"); + check("_b__b_", "\\\\"); + + check("_lt_", "<"); + check("_lt__lt_", "<<"); + + check("_gt_", ">"); + check("_gt__gt_", ">>"); + + check("_c_", ":"); + check("_c__c_", "::"); + + check("_q_", "\""); + check("_q__q_", "\"\""); + + check("_sl_", "/"); + check("_sl__sl_", "//"); + + check("_p_", "|"); + check("_p__p_", "||"); + + check("_m_", "?"); + check("_m__m_", "??"); + + check("_a_", "*"); + check("_a__a_", "**"); + + for i in 1u8..=31 { + let mut output = String::new(); + output.push_str("_i"); + output.push_str(&format!("{}", i)); + output.push('_'); + + let mut input = String::new(); + input.push(i as char); + + check(&output, &input); + + let mut output = String::new(); + output.push_str("_i"); + output.push_str(&format!("{}", i)); + output.push('_'); + output.push_str("_i"); + output.push_str(&format!("{}", i)); + output.push('_'); + + let mut input = String::new(); + input.push(i as char); + input.push(i as char); + + check(&output, &input); + } + + check("hello_s_", "hello "); + check("hello_d_", "hello."); + check("hello _s_", "hello "); + check("hello._d_", "hello.."); + check(" hello _s_", " hello "); + check(".hello._d_", ".hello.."); + + for reserved_name in &[ + "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", + "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", + ] { + let seq = format!("{}", &reserved_name); + check( + &format!("_r{}_", seq), + &seq + ); + + let seq = format!("{}", reserved_name.to_lowercase()); + check( + &format!("_r{}_", seq), + &seq + ); + + let seq = format!("{}", title_case(reserved_name)); + check( + &format!("_r{}_", seq), + &seq + ); + + let seq = format!("{}", &reserved_name); + let input = format!("{}.txt", &seq); + let output = format!("_r{}_.txt", &seq); + check(&output, &input); + + let seq = format!("{}", &reserved_name); + let input = format!("{}.", &seq); + let output = format!("_r{}__d_", &seq); + check(&output, &input); + + let seq = format!("{}", &reserved_name); + let input = format!("{}.a", &seq); + let output = format!("_r{}_.a", &seq); + check(&output, &input); + + let seq = format!("{}", &reserved_name); + let input = format!("hi {} and bye", &seq); + let output = format!("hi {} and bye", &seq); + check(&output, &input); + } + } + + fn title_case(value: &str) -> String { + value + .chars() + .enumerate() + .flat_map(|(i, c)| { + if i == 0 { + Box::new(c.to_uppercase()) as Box> + } else { + Box::new(c.to_lowercase()) as Box> + } + }) + .collect() + } +} From 3c5bffa2e97af78734ce95a3b0e5dab834f0fca8 Mon Sep 17 00:00:00 2001 From: Nerijus Arlauskas Date: Sun, 2 Dec 2018 17:27:58 +0200 Subject: [PATCH 4/8] Resource modification watch --- lesson-25-x-terrain/core/shaders/quad.frag | 1 - lesson-25-x-terrain/src/main.rs | 6 +- lib/resources/src/backend/filesystem.rs | 113 ++++++- lib/resources/src/backend/mod.rs | 15 +- lib/resources/src/path.rs | 329 ++++++++++----------- lib/resources/src/shared/mod.rs | 83 +++++- 6 files changed, 354 insertions(+), 193 deletions(-) diff --git a/lesson-25-x-terrain/core/shaders/quad.frag b/lesson-25-x-terrain/core/shaders/quad.frag index dbc71c2..181aa6c 100644 --- a/lesson-25-x-terrain/core/shaders/quad.frag +++ b/lesson-25-x-terrain/core/shaders/quad.frag @@ -8,6 +8,5 @@ out vec4 Color; void main() { - Color = IN.Color; } \ No newline at end of file diff --git a/lesson-25-x-terrain/src/main.rs b/lesson-25-x-terrain/src/main.rs index fed7052..b34b2b3 100644 --- a/lesson-25-x-terrain/src/main.rs +++ b/lesson-25-x-terrain/src/main.rs @@ -20,7 +20,8 @@ fn run() -> Result<(), failure::Error> { "core", 0, FileSystem::from_rel_path(env!("CARGO_MANIFEST_DIR"), "core") - .with_write(), + .with_write() + .with_watch(), ); let res = resources.resource("shaders/quad.frag"); @@ -31,8 +32,7 @@ fn run() -> Result<(), failure::Error> { resources.notify_changes_synced(p); } - let mut v = String::new(); - ::std::io::stdin().read_line(&mut v).unwrap(); + ::std::thread::sleep_ms(500); } Ok(()) diff --git a/lib/resources/src/backend/filesystem.rs b/lib/resources/src/backend/filesystem.rs index 51605f6..31e791b 100644 --- a/lib/resources/src/backend/filesystem.rs +++ b/lib/resources/src/backend/filesystem.rs @@ -1,48 +1,129 @@ -use crate::backend::{Backend, BackendSyncPoint}; +use crate::backend::{Backend, BackendSyncPoint, Modification}; use std::path::{Path, PathBuf}; use std::{fs, io}; +use std::collections::VecDeque; use crate::{Error, ResourcePath}; use std::sync::Mutex; #[cfg(feature = "backend_filesystem_watch")] mod watch_impl { + use std::collections::VecDeque; use std::path::{Path, PathBuf}; - use std::sync::mpsc::{channel, Receiver}; - use std::time::Duration; + use std::sync::mpsc::{channel, Receiver, TryRecvError}; + use std::time::{Duration, Instant}; use notify::{RecommendedWatcher, Watcher as NotifyWatcher, RecursiveMode, DebouncedEvent}; + use crate::backend::{BackendSyncPoint, Modification}; + use crate::{ResourcePathBuf}; pub struct Watcher { root_path: PathBuf, - watcher: RecommendedWatcher, + _watcher: RecommendedWatcher, receiver: Receiver, + outdated_at: Option, } impl Watcher { pub fn new(root_path: &Path) -> Option { let (tx, rx) = channel(); - let mut watcher: RecommendedWatcher = NotifyWatcher::new(tx, Duration::from_secs(2)) - .map_err(|e| error!("faled to create watcher for {:?}", root_path)) + let mut watcher: RecommendedWatcher = NotifyWatcher::new(tx, Duration::from_millis(50)) + .map_err(|e| error!("failed to create watcher for {:?}, {:?}", root_path, e)) .ok()?; watcher.watch(root_path, RecursiveMode::Recursive).ok()?; Some(Watcher { root_path: root_path.into(), - watcher, + _watcher: watcher, receiver: rx, + outdated_at: None, }) } + + pub fn notify_changes_synced(&mut self, point: BackendSyncPoint) { + if let Some(last_outdated) = self.outdated_at { + if point.instant == last_outdated { + self.outdated_at = None; + } + } + } + + pub fn new_changes(&mut self, queue: &mut VecDeque) -> Option { + let mut something_outdated = false; + + loop { + match self.receiver.try_recv() { + Ok(event) => { + match event { + DebouncedEvent::Create(path) => { + if let Some(resource_path) = ResourcePathBuf::from_filesystem_path(&self.root_path, &path) { + queue.push_back(Modification::Create(resource_path)); + something_outdated = true; + } else { + warn!("unrecognised resource path {:?} for {} event", path, "Create") + } + }, + DebouncedEvent::Write(path) => { + if let Some(resource_path) = ResourcePathBuf::from_filesystem_path(&self.root_path, &path) { + queue.push_back(Modification::Write(resource_path)); + something_outdated = true; + } else { + warn!("unrecognised resource path {:?} for {} event", path, "Write") + } + }, + DebouncedEvent::Remove(path) => { + if let Some(resource_path) = ResourcePathBuf::from_filesystem_path(&self.root_path, &path) { + queue.push_back(Modification::Remove(resource_path)); + something_outdated = true; + } else { + warn!("unrecognised resource path {:?} for {} event", path, "Remove") + } + }, + DebouncedEvent::Rename(from_path, to_path) => { + match (ResourcePathBuf::from_filesystem_path(&self.root_path, &from_path), ResourcePathBuf::from_filesystem_path(&self.root_path, &to_path)) { + (Some(from), Some(to)) => { + queue.push_back(Modification::Rename { from, to }); + something_outdated = true; + }, + (None, Some(_)) => warn!("unrecognised resource path {:?} for {} event", from_path, "Rename"), + (Some(_), None) => warn!("unrecognised resource path {:?} for {} event", to_path, "Rename"), + (None, None) => warn!("unrecognised resource paths {:?} and {:?} for Rename event", from_path, to_path), + } + }, + _ => (), + } + }, + Err(TryRecvError::Empty) => break, + Err(TryRecvError::Disconnected) => { + error!("filesystem watcher disconnected"); + break; + }, + } + } + + if something_outdated { + let outdated_at = Instant::now(); + + self.outdated_at = Some(outdated_at); + + Some(BackendSyncPoint { instant: outdated_at }) + } else { + None + } + } } } #[cfg(not(feature = "backend_filesystem_watch"))] mod watch_impl { - use std::path::{Path}; + use std::collections::VecDeque; + use crate::backend::{BackendSyncPoint, Modification}; pub struct Watcher {} impl Watcher { - pub fn new(_root_path: &Path) -> Option { + pub fn notify_changes_synced(&mut self, _point: BackendSyncPoint) {} + + pub fn new_changes(&mut self, _queue: &mut VecDeque) -> Option { None } } @@ -91,10 +172,18 @@ impl Backend for FileSystem { resource_name_to_path(&self.root_path, path).exists() } - fn notify_changes_synced(&mut self, _point: BackendSyncPoint) {} + fn notify_changes_synced(&mut self, point: BackendSyncPoint) { + if let Some(ref mut watch) = self.watch { + watch.lock().unwrap().notify_changes_synced(point); + } + } - fn new_changes(&mut self) -> Option { - None + fn new_changes(&mut self, queue: &mut VecDeque) -> Option { + if let Some(ref mut watch) = self.watch { + watch.lock().unwrap().new_changes(queue) + } else { + None + } } fn read_into(&mut self, path: &ResourcePath, mut output: &mut io::Write) -> Result<(), Error> { diff --git a/lib/resources/src/backend/mod.rs b/lib/resources/src/backend/mod.rs index 6c220c0..404861a 100644 --- a/lib/resources/src/backend/mod.rs +++ b/lib/resources/src/backend/mod.rs @@ -1,4 +1,5 @@ -use crate::path::ResourcePath; +use crate::path::{ResourcePath, ResourcePathBuf}; +use std::collections::VecDeque; use std::io; use std::time::Instant; use crate::Error; @@ -20,7 +21,15 @@ pub use self::filesystem::FileSystem; #[derive(Eq, PartialEq, Copy, Clone, Debug)] pub struct BackendSyncPoint { - instant: Instant, + pub (crate) instant: Instant, +} + +#[derive(Eq, PartialEq,Clone, Debug)] +pub enum Modification { + Create(ResourcePathBuf), + Write(ResourcePathBuf), + Remove(ResourcePathBuf), + Rename { from: ResourcePathBuf, to: ResourcePathBuf }, } impl BackendSyncPoint { @@ -36,7 +45,7 @@ pub trait Backend: Send + Sync { fn exists(&self, path: &ResourcePath) -> bool; fn notify_changes_synced(&mut self, point: BackendSyncPoint); - fn new_changes(&mut self) -> Option; + fn new_changes(&mut self, queue: &mut VecDeque) -> Option; fn read_into(&mut self, path: &ResourcePath, output: &mut io::Write) -> Result<(), Error>; fn read_vec(&mut self, path: &ResourcePath) -> Result, Error> { diff --git a/lib/resources/src/path.rs b/lib/resources/src/path.rs index 76c69c0..f90d1a5 100644 --- a/lib/resources/src/path.rs +++ b/lib/resources/src/path.rs @@ -147,7 +147,11 @@ impl ResourcePathBuf { let mut path = ResourcePathBuf { inner: String::with_capacity(relative_dir.as_os_str().len() + 32) }; for part in relative_dir.components() { - path = path.join(unsanitize_path_component(part.as_os_str()).as_ref()); + if let Some(unsanitized_part) = unsanitize_path_component(part.as_os_str()) { + path = path.join(unsanitized_part.as_ref()); + } else { + return None; + } } Some(path) @@ -217,25 +221,25 @@ fn check_for_sanitize_fix(previous_len: usize, remainder: &[u8]) -> Option { return Some(FixSolution { problematic_sequence_len: 3, - fix: FixOutput::Triple(b"_r", remainder, b"_"), + fix: FixOutput::Triple(b"+r", remainder, b"+"), }) } (b'o', b'n', Some(b'.'), _) => { return Some(FixSolution { problematic_sequence_len: 3, - fix: FixOutput::Triple(b"_r", &remainder[..3], b"_"), + fix: FixOutput::Triple(b"+r", &remainder[..3], b"+"), }) } (b'o', b'm', Some(b'1'...b'9'), None) => { return Some(FixSolution { problematic_sequence_len: 4, - fix: FixOutput::Triple(b"_r", remainder, b"_"), + fix: FixOutput::Triple(b"+r", remainder, b"+"), }) } (b'o', b'm', Some(b'1'...b'9'), Some(b'.')) => { return Some(FixSolution { problematic_sequence_len: 4, - fix: FixOutput::Triple(b"_r", &remainder[..4], b"_"), + fix: FixOutput::Triple(b"+r", &remainder[..4], b"+"), }) } _ => (), @@ -250,13 +254,13 @@ fn check_for_sanitize_fix(previous_len: usize, remainder: &[u8]) -> Option { return Some(FixSolution { problematic_sequence_len: 3, - fix: FixOutput::Triple(b"_r", remainder, b"_"), + fix: FixOutput::Triple(b"+r", remainder, b"+"), }) } (b'r', b'n', Some(b'.')) => { return Some(FixSolution { problematic_sequence_len: 3, - fix: FixOutput::Triple(b"_r", &remainder[..3], b"_"), + fix: FixOutput::Triple(b"+r", &remainder[..3], b"+"), }) } _ => (), @@ -271,13 +275,13 @@ fn check_for_sanitize_fix(previous_len: usize, remainder: &[u8]) -> Option { return Some(FixSolution { problematic_sequence_len: 3, - fix: FixOutput::Triple(b"_r", remainder, b"_"), + fix: FixOutput::Triple(b"+r", remainder, b"+"), }) } (b'u', b'x', Some(b'.')) => { return Some(FixSolution { problematic_sequence_len: 3, - fix: FixOutput::Triple(b"_r", &remainder[..3], b"_"), + fix: FixOutput::Triple(b"+r", &remainder[..3], b"+"), }) } _ => (), @@ -292,13 +296,13 @@ fn check_for_sanitize_fix(previous_len: usize, remainder: &[u8]) -> Option { return Some(FixSolution { problematic_sequence_len: 3, - fix: FixOutput::Triple(b"_r", remainder, b"_"), + fix: FixOutput::Triple(b"+r", remainder, b"+"), }) } (b'u', b'l', Some(b'.')) => { return Some(FixSolution { problematic_sequence_len: 3, - fix: FixOutput::Triple(b"_r", &remainder[..3], b"_"), + fix: FixOutput::Triple(b"+r", &remainder[..3], b"+"), }) } _ => (), @@ -314,13 +318,13 @@ fn check_for_sanitize_fix(previous_len: usize, remainder: &[u8]) -> Option { return Some(FixSolution { problematic_sequence_len: 4, - fix: FixOutput::Triple(b"_r", remainder, b"_"), + fix: FixOutput::Triple(b"+r", remainder, b"+"), }) } (b'p', b't', b'1'...b'9', Some(b'.')) => { return Some(FixSolution { problematic_sequence_len: 4, - fix: FixOutput::Triple(b"_r", &remainder[..4], b"_"), + fix: FixOutput::Triple(b"+r", &remainder[..4], b"+"), }) } _ => (), @@ -333,88 +337,88 @@ fn check_for_sanitize_fix(previous_len: usize, remainder: &[u8]) -> Option Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_b_"), + fix: FixOutput::Single(b"+b+"), }), - b'_' => Some(FixSolution { + b'+' => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"__"), + fix: FixOutput::Single(b"++"), }), b'<' => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_lt_"), + fix: FixOutput::Single(b"+lt+"), }), b'>' => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_gt_"), + fix: FixOutput::Single(b"+gt+"), }), b':' => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_c_"), + fix: FixOutput::Single(b"+c+"), }), b'\"' => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_q_"), + fix: FixOutput::Single(b"+q+"), }), b'/' => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_sl_"), + fix: FixOutput::Single(b"+sl+"), }), b'|' => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_p_"), + fix: FixOutput::Single(b"+p+"), }), b'?' => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_m_"), + fix: FixOutput::Single(b"+m+"), }), b'*' => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_a_"), + fix: FixOutput::Single(b"+a+"), }), i @ 1..=31 => Some(FixSolution { problematic_sequence_len: 1, fix: match i { - 1 => FixOutput::Single(b"_i1_"), - 2 => FixOutput::Single(b"_i2_"), - 3 => FixOutput::Single(b"_i3_"), - 4 => FixOutput::Single(b"_i4_"), - 5 => FixOutput::Single(b"_i5_"), - 6 => FixOutput::Single(b"_i6_"), - 7 => FixOutput::Single(b"_i7_"), - 8 => FixOutput::Single(b"_i8_"), - 9 => FixOutput::Single(b"_i9_"), - 10 => FixOutput::Single(b"_i10_"), - 11 => FixOutput::Single(b"_i11_"), - 12 => FixOutput::Single(b"_i12_"), - 13 => FixOutput::Single(b"_i13_"), - 14 => FixOutput::Single(b"_i14_"), - 15 => FixOutput::Single(b"_i15_"), - 16 => FixOutput::Single(b"_i16_"), - 17 => FixOutput::Single(b"_i17_"), - 18 => FixOutput::Single(b"_i18_"), - 19 => FixOutput::Single(b"_i19_"), - 20 => FixOutput::Single(b"_i20_"), - 21 => FixOutput::Single(b"_i21_"), - 22 => FixOutput::Single(b"_i22_"), - 23 => FixOutput::Single(b"_i23_"), - 24 => FixOutput::Single(b"_i24_"), - 25 => FixOutput::Single(b"_i25_"), - 26 => FixOutput::Single(b"_i26_"), - 27 => FixOutput::Single(b"_i27_"), - 28 => FixOutput::Single(b"_i28_"), - 29 => FixOutput::Single(b"_i29_"), - 30 => FixOutput::Single(b"_i30_"), - 31 => FixOutput::Single(b"_i31_"), + 1 => FixOutput::Single(b"+i1+"), + 2 => FixOutput::Single(b"+i2+"), + 3 => FixOutput::Single(b"+i3+"), + 4 => FixOutput::Single(b"+i4+"), + 5 => FixOutput::Single(b"+i5+"), + 6 => FixOutput::Single(b"+i6+"), + 7 => FixOutput::Single(b"+i7+"), + 8 => FixOutput::Single(b"+i8+"), + 9 => FixOutput::Single(b"+i9+"), + 10 => FixOutput::Single(b"+i10+"), + 11 => FixOutput::Single(b"+i11+"), + 12 => FixOutput::Single(b"+i12+"), + 13 => FixOutput::Single(b"+i13+"), + 14 => FixOutput::Single(b"+i14+"), + 15 => FixOutput::Single(b"+i15+"), + 16 => FixOutput::Single(b"+i16+"), + 17 => FixOutput::Single(b"+i17+"), + 18 => FixOutput::Single(b"+i18+"), + 19 => FixOutput::Single(b"+i19+"), + 20 => FixOutput::Single(b"+i20+"), + 21 => FixOutput::Single(b"+i21+"), + 22 => FixOutput::Single(b"+i22+"), + 23 => FixOutput::Single(b"+i23+"), + 24 => FixOutput::Single(b"+i24+"), + 25 => FixOutput::Single(b"+i25+"), + 26 => FixOutput::Single(b"+i26+"), + 27 => FixOutput::Single(b"+i27+"), + 28 => FixOutput::Single(b"+i28+"), + 29 => FixOutput::Single(b"+i29+"), + 30 => FixOutput::Single(b"+i30+"), + 31 => FixOutput::Single(b"+i31+"), _ => unreachable!("should be in range 1 - 31"), }, }), b'.' if remainder.len() == 1 => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_d_"), + fix: FixOutput::Single(b"+d+"), }), b' ' if remainder.len() == 1 => Some(FixSolution { problematic_sequence_len: 1, - fix: FixOutput::Single(b"_s_"), + fix: FixOutput::Single(b"+s+"), }), _ => None, } @@ -523,7 +527,7 @@ pub fn sanitize_path_component(component: &str) -> Cow { use std::ffi::OsStr; -pub fn unsanitize_path_component(component: &OsStr) -> Cow { +pub fn unsanitize_path_component(component: &OsStr) -> Option> { #[derive(Copy, Clone)] enum FixState { Underscore, @@ -538,7 +542,7 @@ pub fn unsanitize_path_component(component: &OsStr) -> Cow { let part = component.to_string_lossy(); if part.len() == 0 { - return part; + return Some(part); } let state = { @@ -548,7 +552,7 @@ pub fn unsanitize_path_component(component: &OsStr) -> Cow { let mut position = 0; loop { - if bytes[position] == b'_' { + if bytes[position] == b'+' { let mut ok_data = Vec::with_capacity(bytes_len); ok_data.extend(bytes.iter().take(position)); break UnsanitizeState::Fixed { bytes: ok_data, state: FixState::Underscore, position: position + 1 }; @@ -561,7 +565,7 @@ pub fn unsanitize_path_component(component: &OsStr) -> Cow { }; match state { - UnsanitizeState::ReuseSameString => return part, + UnsanitizeState::ReuseSameString => return Some(part), UnsanitizeState::Fixed { mut bytes, mut state, mut position } => { let src_bytes = part.as_ref().as_bytes(); let src_bytes_len = src_bytes.len(); @@ -572,21 +576,20 @@ pub fn unsanitize_path_component(component: &OsStr) -> Cow { let remaining_len = src_bytes_len - position; if remaining_len == 0 { - bytes.push(b'_'); // invalid file - break; + return None; } let next_char = src_bytes[position]; - if remaining_len > 0 && next_char == b'_' { - bytes.push(b'_'); + if remaining_len > 0 && next_char == b'+' { + bytes.push(b'+'); position += 1; state = FixState::Scan; - } else if remaining_len > 4 && next_char == b'r' && src_bytes[position + 4] == b'_' { + } else if remaining_len > 4 && next_char == b'r' && src_bytes[position + 4] == b'+' { bytes.extend_from_slice(&src_bytes[position + 1..position + 4]); position += 5; state = FixState::Scan; - } else if remaining_len > 5 && next_char == b'r' && src_bytes[position + 5] == b'_' { + } else if remaining_len > 5 && next_char == b'r' && src_bytes[position + 5] == b'+' { bytes.extend_from_slice(&src_bytes[position + 1..position + 5]); position += 6; state = FixState::Scan; @@ -595,46 +598,42 @@ pub fn unsanitize_path_component(component: &OsStr) -> Cow { let next_char3 = src_bytes[position + 2]; match (next_char2, next_char3) { - (b'1', b'_') => bytes.push(1), - (b'2', b'_') => bytes.push(2), - (b'3', b'_') => bytes.push(3), - (b'4', b'_') => bytes.push(4), - (b'5', b'_') => bytes.push(5), - (b'6', b'_') => bytes.push(6), - (b'7', b'_') => bytes.push(7), - (b'8', b'_') => bytes.push(8), - (b'9', b'_') => bytes.push(9), + (b'1', b'+') => bytes.push(1), + (b'2', b'+') => bytes.push(2), + (b'3', b'+') => bytes.push(3), + (b'4', b'+') => bytes.push(4), + (b'5', b'+') => bytes.push(5), + (b'6', b'+') => bytes.push(6), + (b'7', b'+') => bytes.push(7), + (b'8', b'+') => bytes.push(8), + (b'9', b'+') => bytes.push(9), _ => if remaining_len > 3 { let next_char4 = src_bytes[position + 3]; match (next_char2, next_char3, next_char4) { - (b'1', b'0', b'_') => bytes.push(10), - (b'1', b'1', b'_') => bytes.push(11), - (b'1', b'2', b'_') => bytes.push(12), - (b'1', b'3', b'_') => bytes.push(13), - (b'1', b'4', b'_') => bytes.push(14), - (b'1', b'5', b'_') => bytes.push(15), - (b'1', b'6', b'_') => bytes.push(16), - (b'1', b'7', b'_') => bytes.push(17), - (b'1', b'8', b'_') => bytes.push(18), - (b'1', b'9', b'_') => bytes.push(19), - (b'2', b'0', b'_') => bytes.push(20), - (b'2', b'1', b'_') => bytes.push(21), - (b'2', b'2', b'_') => bytes.push(22), - (b'2', b'3', b'_') => bytes.push(23), - (b'2', b'4', b'_') => bytes.push(24), - (b'2', b'5', b'_') => bytes.push(25), - (b'2', b'6', b'_') => bytes.push(26), - (b'2', b'7', b'_') => bytes.push(27), - (b'2', b'8', b'_') => bytes.push(28), - (b'2', b'9', b'_') => bytes.push(29), - (b'3', b'0', b'_') => bytes.push(30), - (b'3', b'1', b'_') => bytes.push(31), - _ => { - bytes.push(b'_'); - bytes.extend_from_slice(&src_bytes[position..]); // invalid file - break; - }, + (b'1', b'0', b'+') => bytes.push(10), + (b'1', b'1', b'+') => bytes.push(11), + (b'1', b'2', b'+') => bytes.push(12), + (b'1', b'3', b'+') => bytes.push(13), + (b'1', b'4', b'+') => bytes.push(14), + (b'1', b'5', b'+') => bytes.push(15), + (b'1', b'6', b'+') => bytes.push(16), + (b'1', b'7', b'+') => bytes.push(17), + (b'1', b'8', b'+') => bytes.push(18), + (b'1', b'9', b'+') => bytes.push(19), + (b'2', b'0', b'+') => bytes.push(20), + (b'2', b'1', b'+') => bytes.push(21), + (b'2', b'2', b'+') => bytes.push(22), + (b'2', b'3', b'+') => bytes.push(23), + (b'2', b'4', b'+') => bytes.push(24), + (b'2', b'5', b'+') => bytes.push(25), + (b'2', b'6', b'+') => bytes.push(26), + (b'2', b'7', b'+') => bytes.push(27), + (b'2', b'8', b'+') => bytes.push(28), + (b'2', b'9', b'+') => bytes.push(29), + (b'3', b'0', b'+') => bytes.push(30), + (b'3', b'1', b'+') => bytes.push(31), + _ => return None, } position += 1; @@ -647,25 +646,22 @@ pub fn unsanitize_path_component(component: &OsStr) -> Cow { let next_char2 = src_bytes[position + 1]; match (next_char, next_char2) { - (b'd', b'_') => bytes.push(b'.'), - (b'b', b'_') => bytes.push(b'\\'), - (b'c', b'_') => bytes.push(b':'), - (b'q', b'_') => bytes.push(b'\"'), - (b'p', b'_') => bytes.push(b'|'), - (b'm', b'_') => bytes.push(b'?'), - (b'a', b'_') => bytes.push(b'*'), - (b's', b'_') => bytes.push(b' '), + (b'd', b'+') => bytes.push(b'.'), + (b'b', b'+') => bytes.push(b'\\'), + (b'c', b'+') => bytes.push(b':'), + (b'q', b'+') => bytes.push(b'\"'), + (b'p', b'+') => bytes.push(b'|'), + (b'm', b'+') => bytes.push(b'?'), + (b'a', b'+') => bytes.push(b'*'), + (b's', b'+') => bytes.push(b' '), _ => if remaining_len > 2 { let next_char3 = src_bytes[position + 2]; match (next_char, next_char2, next_char3) { - (b'l', b't', b'_') => bytes.push(b'<'), - (b'g', b't', b'_') => bytes.push(b'>'), - (b's', b'l', b'_') => bytes.push(b'/'), - _ => { - bytes.push(b'_'); - bytes.extend_from_slice(&src_bytes[position..]); // invalid file - }, + (b'l', b't', b'+') => bytes.push(b'<'), + (b'g', b't', b'+') => bytes.push(b'>'), + (b's', b'l', b'+') => bytes.push(b'/'), + _ => return None, } position += 1; @@ -674,11 +670,7 @@ pub fn unsanitize_path_component(component: &OsStr) -> Cow { position += 2; state = FixState::Scan; - } else { - bytes.push(b'_'); - bytes.extend_from_slice(&src_bytes[position..]); // invalid file - break; - } + } else { return None } }, FixState::Scan => { if position == src_bytes_len { @@ -687,7 +679,7 @@ pub fn unsanitize_path_component(component: &OsStr) -> Cow { let next_char = src_bytes[position]; - if next_char == b'_' { + if next_char == b'+' { state = FixState::Underscore; } else { bytes.push(next_char); @@ -698,7 +690,7 @@ pub fn unsanitize_path_component(component: &OsStr) -> Cow { } } - Cow::from(String::from_utf8(bytes).expect("bytes already undergone lossy conversion to utf8")) + Some(Cow::from(String::from_utf8(bytes).expect("bytes already undergone lossy conversion to utf8"))) } } } @@ -718,54 +710,57 @@ mod normalize_path_tests { // this is not valid path, but not a concern of this function check("", ""); - // _ is the start of the escape sequence, so this escapes the escape sequence - check("__", "_"); - check("____", "__"); + // + is the start of the escape sequence, so this escapes the escape sequence + check("++", "+"); + check("++++", "++"); // kill path traversing - check("_d_", "."); - check("._d_", ".."); + check("+d+", "."); + check(".+d+", ".."); // simple unsanitized names check("hello world", "hello world"); check("hello-world", "hello-world"); - check("hello+world", "hello+world"); + check("hello_world", "hello_world"); + + // underscore handling + assert_eq!("quad+.vert", unsanitize_path_component(&OsString::from("quad+.vert")).as_ref()); } #[test] fn test_windows() { - check("_b_", "\\"); - check("_b__b_", "\\\\"); + check("+b+", "\\"); + check("+b++b+", "\\\\"); - check("_lt_", "<"); - check("_lt__lt_", "<<"); + check("+lt+", "<"); + check("+lt++lt+", "<<"); - check("_gt_", ">"); - check("_gt__gt_", ">>"); + check("+gt+", ">"); + check("+gt++gt+", ">>"); - check("_c_", ":"); - check("_c__c_", "::"); + check("+c+", ":"); + check("+c++c+", "::"); - check("_q_", "\""); - check("_q__q_", "\"\""); + check("+q+", "\""); + check("+q++q+", "\"\""); - check("_sl_", "/"); - check("_sl__sl_", "//"); + check("+sl+", "/"); + check("+sl++sl+", "//"); - check("_p_", "|"); - check("_p__p_", "||"); + check("+p+", "|"); + check("+p++p+", "||"); - check("_m_", "?"); - check("_m__m_", "??"); + check("+m+", "?"); + check("+m++m+", "??"); - check("_a_", "*"); - check("_a__a_", "**"); + check("+a+", "*"); + check("+a++a+", "**"); for i in 1u8..=31 { let mut output = String::new(); - output.push_str("_i"); + output.push_str("+i"); output.push_str(&format!("{}", i)); - output.push('_'); + output.push('+'); let mut input = String::new(); input.push(i as char); @@ -773,12 +768,12 @@ mod normalize_path_tests { check(&output, &input); let mut output = String::new(); - output.push_str("_i"); + output.push_str("+i"); output.push_str(&format!("{}", i)); - output.push('_'); - output.push_str("_i"); + output.push('+'); + output.push_str("+i"); output.push_str(&format!("{}", i)); - output.push('_'); + output.push('+'); let mut input = String::new(); input.push(i as char); @@ -787,12 +782,12 @@ mod normalize_path_tests { check(&output, &input); } - check("hello_s_", "hello "); - check("hello_d_", "hello."); - check("hello _s_", "hello "); - check("hello._d_", "hello.."); - check(" hello _s_", " hello "); - check(".hello._d_", ".hello.."); + check("hello+s+", "hello "); + check("hello+d+", "hello."); + check("hello +s+", "hello "); + check("hello.+d+", "hello.."); + check(" hello +s+", " hello "); + check(".hello.+d+", ".hello.."); for reserved_name in &[ "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", @@ -800,35 +795,35 @@ mod normalize_path_tests { ] { let seq = format!("{}", &reserved_name); check( - &format!("_r{}_", seq), + &format!("+r{}+", seq), &seq ); let seq = format!("{}", reserved_name.to_lowercase()); check( - &format!("_r{}_", seq), + &format!("+r{}+", seq), &seq ); let seq = format!("{}", title_case(reserved_name)); check( - &format!("_r{}_", seq), + &format!("+r{}+", seq), &seq ); let seq = format!("{}", &reserved_name); let input = format!("{}.txt", &seq); - let output = format!("_r{}_.txt", &seq); + let output = format!("+r{}+.txt", &seq); check(&output, &input); let seq = format!("{}", &reserved_name); let input = format!("{}.", &seq); - let output = format!("_r{}__d_", &seq); + let output = format!("+r{}++d+", &seq); check(&output, &input); let seq = format!("{}", &reserved_name); let input = format!("{}.a", &seq); - let output = format!("_r{}_.a", &seq); + let output = format!("+r{}+.a", &seq); check(&output, &input); let seq = format!("{}", &reserved_name); diff --git a/lib/resources/src/shared/mod.rs b/lib/resources/src/shared/mod.rs index 088d065..4dc826d 100644 --- a/lib/resources/src/shared/mod.rs +++ b/lib/resources/src/shared/mod.rs @@ -1,8 +1,7 @@ -use crate::backend::{Backend, BackendSyncPoint}; +use crate::backend::{Backend, BackendSyncPoint, Modification}; use crate::path::{ResourcePath, ResourcePathBuf}; use slab::Slab; -use std::collections::BTreeMap; -use std::collections::HashMap; +use std::collections::{HashMap, BTreeMap, VecDeque}; use std::hash::BuildHasherDefault; use std::time::Instant; use twox_hash::XxHash; @@ -38,7 +37,7 @@ pub struct UserKey { user_id: usize, } -#[derive(Eq, PartialEq)] +#[derive(Eq, PartialEq, Copy, Clone)] pub enum InternalSyncPoint { Backend { backend_hash: u64, @@ -54,6 +53,8 @@ pub struct SharedResources { path_resource_ids: HashMap>, backends: BTreeMap>, outdated_at: Option, + + modification_queue: VecDeque, } fn backend_hash(id: &str) -> u64 { @@ -70,6 +71,8 @@ impl SharedResources { path_resource_ids: HashMap::default(), backends: BTreeMap::new(), outdated_at: None, + + modification_queue: VecDeque::new(), } } @@ -77,15 +80,80 @@ impl SharedResources { if let Some(instant) = self.outdated_at { return Some(InternalSyncPoint::Everything { time: instant }); } + + let mut new_change_point = None; + let mut mod_queue = ::std::mem::replace(&mut self.modification_queue, VecDeque::new()); + for (key, backend) in self.backends.iter_mut() { - if let Some(sync_point) = backend.new_changes() { - return Some(InternalSyncPoint::Backend { + mod_queue.clear(); + if let Some(sync_point) = backend.new_changes(&mut mod_queue) { + new_change_point = Some(InternalSyncPoint::Backend { backend_hash: backend_hash(&key.id), sync_point, }); + + break; } } - None + + if let Some(InternalSyncPoint::Backend { backend_hash: bh, sync_point }) = new_change_point { + let mut some_resource_is_modified = false; + + while let Some(modification) = mod_queue.pop_front() { + match modification { + Modification::Create(p) => { + if let Some(resource_id) = self.path_resource_ids.get(&p) { + if let Some(ref mut meta) = self.resource_metadata.get_mut(*resource_id) { + meta.everyone_should_reload(sync_point.instant); + some_resource_is_modified = true; + } + } + }, + Modification::Write(p) => { + if let Some(resource_id) = self.path_resource_ids.get(&p) { + if let Some(ref mut meta) = self.resource_metadata.get_mut(*resource_id) { + meta.everyone_should_reload(sync_point.instant); + some_resource_is_modified = true; + } + } + }, + Modification::Remove(p) => { + if let Some(resource_id) = self.path_resource_ids.get(&p) { + if let Some(ref mut meta) = self.resource_metadata.get_mut(*resource_id) { + meta.everyone_should_reload(sync_point.instant); + some_resource_is_modified = true; + } + } + }, + Modification::Rename { from, to } => { + if let (Some(resource_id), Some(resource_id_to)) = (self.path_resource_ids.get(&from), self.path_resource_ids.get(&to)) { + if let Some(ref mut meta) = self.resource_metadata.get_mut(*resource_id) { + meta.everyone_should_reload(sync_point.instant); + some_resource_is_modified = true; + } + if let Some(ref mut meta) = self.resource_metadata.get_mut(*resource_id_to) { + meta.everyone_should_reload(sync_point.instant); + some_resource_is_modified = true; + } + } + }, + } + } + + if let false = some_resource_is_modified { + for (key, backend) in self.backends.iter_mut() { + if backend_hash(&key.id) == bh { + backend.notify_changes_synced(sync_point); + break; + } + } + new_change_point = None; + } + } + + ::std::mem::replace(&mut self.modification_queue, mod_queue); + + new_change_point } pub fn notify_changes_synced(&mut self, sync_point: InternalSyncPoint) { @@ -100,6 +168,7 @@ impl SharedResources { for (key, backend) in self.backends.iter_mut() { if backend_hash(&key.id) == bh { backend.notify_changes_synced(sp); + break; } } } From 703fc95134ca15984f27c49e37c44f52685377ed Mon Sep 17 00:00:00 2001 From: Nerijus Arlauskas Date: Sun, 2 Dec 2018 22:04:34 +0200 Subject: [PATCH 5/8] Render target --- Cargo.lock | 38 ++++++ lesson-25-x-terrain/Cargo.toml | 3 + lesson-25-x-terrain/render_gl/Cargo.toml | 24 ++++ lesson-25-x-terrain/render_gl/src/lib.rs | 3 + .../render_gl/src/render_target.rs | 90 +++++++++++++ .../render_gl_derive/Cargo.toml | 11 ++ .../render_gl_derive/src/lib.rs | 121 ++++++++++++++++++ lesson-25-x-terrain/src/main.rs | 1 + lib/resources/src/lib.rs | 3 +- lib/winput/Cargo.toml | 7 + lib/winput/src/lib.rs | 12 ++ 11 files changed, 311 insertions(+), 2 deletions(-) create mode 100644 lesson-25-x-terrain/render_gl/Cargo.toml create mode 100644 lesson-25-x-terrain/render_gl/src/lib.rs create mode 100644 lesson-25-x-terrain/render_gl/src/render_target.rs create mode 100644 lesson-25-x-terrain/render_gl_derive/Cargo.toml create mode 100644 lesson-25-x-terrain/render_gl_derive/src/lib.rs create mode 100644 lib/winput/Cargo.toml create mode 100644 lib/winput/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 10ecfd4..12be30d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1217,9 +1217,12 @@ dependencies = [ "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", + "lesson_25_x_render_gl 0.1.0", + "lesson_25_x_render_gl_derive 0.1.0", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "resources 0.1.0", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winput 0.1.0", ] [[package]] @@ -1372,6 +1375,37 @@ dependencies = [ "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "lesson_25_x_render_gl" +version = "0.1.0" +dependencies = [ + "euclid 0.18.2 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "floating-duration 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "font-kit 0.1.0 (git+https://github.com/Nercury/font-kit?branch=patch-lyon-deps)", + "gl 0.1.0", + "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", + "int_hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lesson_25_x_render_gl_derive 0.1.0", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lyon_path 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lyon_tessellation 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ncollide3d 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", + "resources 0.1.0", + "slotmap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "vec-2-10-10-10 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "lesson_25_x_render_gl_derive" +version = "0.1.0" +dependencies = [ + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "libc" version = "0.2.44" @@ -3027,6 +3061,10 @@ dependencies = [ "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "winput" +version = "0.1.0" + [[package]] name = "ws2_32-sys" version = "0.2.1" diff --git a/lesson-25-x-terrain/Cargo.toml b/lesson-25-x-terrain/Cargo.toml index 81ff14b..5549718 100644 --- a/lesson-25-x-terrain/Cargo.toml +++ b/lesson-25-x-terrain/Cargo.toml @@ -6,6 +6,9 @@ edition = "2018" [dependencies] resources = { path = "../lib/resources", features = ["backend_filesystem_watch"] } +winput = { path = "../lib/winput" } +lesson_25_x_render_gl = { path = "render_gl" } +lesson_25_x_render_gl_derive = { path = "render_gl_derive" } gl = { path = "../lib/gl" } failure = "0.1.3" env_logger = "*" diff --git a/lesson-25-x-terrain/render_gl/Cargo.toml b/lesson-25-x-terrain/render_gl/Cargo.toml new file mode 100644 index 0000000..4d9b882 --- /dev/null +++ b/lesson-25-x-terrain/render_gl/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "lesson_25_x_render_gl" +version = "0.1.0" +authors = [] +edition = "2018" + +[dependencies] +gl = { path = "../../lib/gl" } +resources = { path = "../../lib/resources" } +lesson_25_x_render_gl_derive = { path = "../render_gl_derive" } +half = "1.1.1" +vec-2-10-10-10 = "0.1.2" +nalgebra = "0.16" +ncollide3d = "0.17" +failure = "0.1.3" +font-kit = { version = "0.1.0" } +euclid = "0.18.2" +image = "0.20.1" +lyon_tessellation = "0.11.0" +lyon_path = "0.11.0" +int_hash = "0.1.1" +slotmap = "0.3" +log = "0.4.6" +floating-duration = "0.1.2" \ No newline at end of file diff --git a/lesson-25-x-terrain/render_gl/src/lib.rs b/lesson-25-x-terrain/render_gl/src/lib.rs new file mode 100644 index 0000000..9f27b8e --- /dev/null +++ b/lesson-25-x-terrain/render_gl/src/lib.rs @@ -0,0 +1,3 @@ +#[macro_use] extern crate failure; + +pub mod render_target; diff --git a/lesson-25-x-terrain/render_gl/src/render_target.rs b/lesson-25-x-terrain/render_gl/src/render_target.rs new file mode 100644 index 0000000..5c3e91b --- /dev/null +++ b/lesson-25-x-terrain/render_gl/src/render_target.rs @@ -0,0 +1,90 @@ +use nalgebra as na; +use failure; +use gl; +use gl::types::*; + +#[derive(Debug, Fail)] +pub enum Error { + #[fail(display = "Render target creation failed. The framebuffer was not complete.")] + TheFramebufferWasNotComplete, +} + +pub struct DefaultRenderTarget { + size: na::Vector2, + gl: gl::Gl, +} + +impl DefaultRenderTarget { + pub fn new(gl: &gl::Gl, size: na::Vector2) -> DefaultRenderTarget { + DefaultRenderTarget { + size, + gl: gl.clone(), + } + } + + pub fn bind(&self) { + unsafe { + self.gl.BindFramebuffer(gl::FRAMEBUFFER, 0); + } + } +} + +pub struct FramebufferTarget { + size: na::Vector2, + fb: GLuint, + tex: GLuint, + gl: gl::Gl, +} + +impl FramebufferTarget { + pub fn new(gl: &gl::Gl, size: na::Vector2) -> Result { + let mut tex = 0; + let mut fb = 0; + + unsafe { + gl.GenFramebuffers(1, &mut fb); + gl.BindFramebuffer(gl::FRAMEBUFFER, fb); + + gl.GenTextures(1, &mut tex); + gl.BindTexture(gl::TEXTURE_2D, tex); + gl.TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::NEAREST as i32); + gl.TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::NEAREST as i32); + + gl.FramebufferTexture(gl::FRAMEBUFFER, gl::COLOR_ATTACHMENT0, tex, 0); + + gl.TexImage2D(gl::TEXTURE_2D, 0, gl::RGBA as i32, size.x, size.y, 0, gl::RGBA, gl::UNSIGNED_BYTE, std::ptr::null()); + + let complete = gl.CheckFramebufferStatus(gl::FRAMEBUFFER); + + gl.BindFramebuffer(gl::FRAMEBUFFER, 0); + gl.BindTexture(gl::TEXTURE_2D, 0); + + if complete != gl::FRAMEBUFFER_COMPLETE { + return Err(Error::TheFramebufferWasNotComplete); + } + } + + Ok(FramebufferTarget { + size, + fb, + tex, + gl: gl.clone(), + }) + } + + pub fn bind(&self) { + unsafe { + self.gl.BindFramebuffer(gl::FRAMEBUFFER, self.fb); + } + } +} + +impl Drop for FramebufferTarget +{ + fn drop(&mut self){ + unsafe{ + self.gl.DeleteFramebuffers(1, &self.fb); + self.gl.DeleteTextures(1, &self.tex); + } + } +} \ No newline at end of file diff --git a/lesson-25-x-terrain/render_gl_derive/Cargo.toml b/lesson-25-x-terrain/render_gl_derive/Cargo.toml new file mode 100644 index 0000000..93d4109 --- /dev/null +++ b/lesson-25-x-terrain/render_gl_derive/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "lesson_25_x_render_gl_derive" +version = "0.1.0" +authors = [] + +[dependencies] +quote = "0.3.15" +syn = "0.11.11" + +[lib] +proc-macro = true \ No newline at end of file diff --git a/lesson-25-x-terrain/render_gl_derive/src/lib.rs b/lesson-25-x-terrain/render_gl_derive/src/lib.rs new file mode 100644 index 0000000..3996548 --- /dev/null +++ b/lesson-25-x-terrain/render_gl_derive/src/lib.rs @@ -0,0 +1,121 @@ +#![recursion_limit = "128"] + +extern crate proc_macro; +extern crate syn; +#[macro_use] +extern crate quote; + +#[proc_macro_derive(VertexAttribPointers, attributes(location, divisor))] +pub fn vertex_attrib_pointers_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { + let s = input.to_string(); + let ast = syn::parse_derive_input(&s).unwrap(); + let gen = generate_impl(&ast); + gen.parse().unwrap() +} + +fn generate_impl(ast: &syn::DeriveInput) -> quote::Tokens { + let ident = &ast.ident; + let generics = &ast.generics; + let where_clause = &ast.generics.where_clause; + let fields_vertex_attrib_pointer = generate_vertex_attrib_pointer_calls(&ast.body); + + quote!{ + impl #ident #generics #where_clause { + #[allow(unused_variables)] + pub fn vertex_attrib_pointers(gl: &::gl::Gl) { + let stride = ::std::mem::size_of::(); + let offset = 0; + + #(#fields_vertex_attrib_pointer)* + } + } + } +} + +fn generate_vertex_attrib_pointer_calls(body: &syn::Body) -> Vec { + match body { + &syn::Body::Enum(_) => panic!("VertexAttribPointers can not be implemented for enums"), + &syn::Body::Struct(syn::VariantData::Unit) => { + panic!("VertexAttribPointers can not be implemented for Unit structs") + } + &syn::Body::Struct(syn::VariantData::Tuple(_)) => { + panic!("VertexAttribPointers can not be implemented for Tuple structs") + } + &syn::Body::Struct(syn::VariantData::Struct(ref s)) => s + .iter() + .map(generate_struct_field_vertex_attrib_pointer_call) + .collect(), + } +} + +fn generate_struct_field_vertex_attrib_pointer_call(field: &syn::Field) -> quote::Tokens { + let field_name = match field.ident { + Some(ref i) => format!("{}", i), + None => String::from(""), + }; + let field_ty = &field.ty; + + if let Some(location_attr) = field + .attrs + .iter() + .filter(|a| a.value.name() == "location") + .next() + { + let location_value: usize = match location_attr.value { + syn::MetaItem::NameValue(_, syn::Lit::Str(ref s, _)) => { + s.parse().unwrap_or_else(|_| { + panic!( + "Field {} location attribute value must contain an integer", + field_name + ) + }) + } + _ => panic!( + "Field {} location attribute value must be a string literal", + field_name + ), + }; + + let divisor_call = match field + .attrs + .iter() + .filter(|a| a.value.name() == "divisor") + .next() + { + Some(attr) => { + let divisor_value: u32 = match attr.value { + syn::MetaItem::NameValue(_, syn::Lit::Str(ref s, _)) => { + s.parse().unwrap_or_else(|_| { + panic!( + "Field {} divisor attribute value must contain an integer", + field_name + ) + }) + } + _ => panic!( + "Field {} divisor attribute value must be a string literal", + field_name + ), + }; + + quote! { + gl.VertexAttribDivisor(#location_value as u32, #divisor_value); + } + } + None => quote!{}, + }; + + quote! { + let location = #location_value; + unsafe { + #field_ty::vertex_attrib_pointer(gl, stride, location, offset); + #divisor_call + } + let offset = offset + ::std::mem::size_of::<#field_ty>(); + } + } else { + quote! { + let offset = offset + ::std::mem::size_of::<#field_ty>(); + } + } +} diff --git a/lesson-25-x-terrain/src/main.rs b/lesson-25-x-terrain/src/main.rs index b34b2b3..9d27b06 100644 --- a/lesson-25-x-terrain/src/main.rs +++ b/lesson-25-x-terrain/src/main.rs @@ -3,6 +3,7 @@ use resources::{ Resources, backend::FileSystem }; +use winput; mod debug; mod onion; diff --git a/lib/resources/src/lib.rs b/lib/resources/src/lib.rs index bdb95f9..aff1434 100644 --- a/lib/resources/src/lib.rs +++ b/lib/resources/src/lib.rs @@ -246,8 +246,7 @@ mod test { } #[test] - fn writing_resource_should_produce_change_sync_point_and_other_resource_proxies_should_see_it_as_modified( -) { + fn writing_resource_should_produce_change_sync_point_and_other_resource_proxies_should_see_it_as_modified() { let res = Resources::new().loaded_from("a", 0, backend::InMemory::new().with("name", b"hello")); diff --git a/lib/winput/Cargo.toml b/lib/winput/Cargo.toml new file mode 100644 index 0000000..6075f3b --- /dev/null +++ b/lib/winput/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "winput" +version = "0.1.0" +authors = [] +edition = "2018" + +[dependencies] diff --git a/lib/winput/src/lib.rs b/lib/winput/src/lib.rs new file mode 100644 index 0000000..217a4c4 --- /dev/null +++ b/lib/winput/src/lib.rs @@ -0,0 +1,12 @@ +#[derive(Debug, Copy, Clone)] +pub struct WindowDimensions { + pub size: WindowSize, + pub hdpi_size: WindowSize, + pub high_dpi: bool, +} + +#[derive(Debug, Copy, Clone)] +pub struct WindowSize { + pub width: i32, + pub height: i32, +} \ No newline at end of file From 4dc1135037e8c9b30958e7cf76be12ec51d3d025 Mon Sep 17 00:00:00 2001 From: Nerijus Arlauskas Date: Wed, 5 Dec 2018 00:56:30 +0200 Subject: [PATCH 6/8] Config experiment --- Cargo.lock | 15 +++ lesson-25-x-terrain/Cargo.toml | 1 + .../{src/onion.rs => core/Windows.toml} | 0 lesson-25-x-terrain/src/main.rs | 37 ++++-- lib/config/Cargo.toml | 11 ++ lib/config/src/lib.rs | 76 +++++++++++ lib/winput/Cargo.toml | 5 + lib/winput/src/lib.rs | 122 ++++++++++++++++++ 8 files changed, 259 insertions(+), 8 deletions(-) rename lesson-25-x-terrain/{src/onion.rs => core/Windows.toml} (100%) create mode 100644 lib/config/Cargo.toml create mode 100644 lib/config/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 12be30d..ee389e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,6 +213,16 @@ name = "color_quant" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "config" +version = "0.1.0" +dependencies = [ + "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "metrohash 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "resources 0.1.0", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "constant_time_eq" version = "0.1.3" @@ -1214,6 +1224,7 @@ dependencies = [ name = "lesson-25-x" version = "0.1.0" dependencies = [ + "config 0.1.0", "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "gl 0.1.0", @@ -3064,6 +3075,10 @@ dependencies = [ [[package]] name = "winput" version = "0.1.0" +dependencies = [ + "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "ws2_32-sys" diff --git a/lesson-25-x-terrain/Cargo.toml b/lesson-25-x-terrain/Cargo.toml index 5549718..5554b0c 100644 --- a/lesson-25-x-terrain/Cargo.toml +++ b/lesson-25-x-terrain/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" [dependencies] resources = { path = "../lib/resources", features = ["backend_filesystem_watch"] } winput = { path = "../lib/winput" } +config = { path = "../lib/config" } lesson_25_x_render_gl = { path = "render_gl" } lesson_25_x_render_gl_derive = { path = "render_gl_derive" } gl = { path = "../lib/gl" } diff --git a/lesson-25-x-terrain/src/onion.rs b/lesson-25-x-terrain/core/Windows.toml similarity index 100% rename from lesson-25-x-terrain/src/onion.rs rename to lesson-25-x-terrain/core/Windows.toml diff --git a/lesson-25-x-terrain/src/main.rs b/lesson-25-x-terrain/src/main.rs index 9d27b06..6c858af 100644 --- a/lesson-25-x-terrain/src/main.rs +++ b/lesson-25-x-terrain/src/main.rs @@ -6,7 +6,6 @@ use resources::{ use winput; mod debug; -mod onion; fn main() { debug::init_logging(); @@ -16,6 +15,16 @@ fn main() { } } +struct WindowsConfig { + +} + +impl Default for WindowsConfig { + fn default() -> Self { + WindowsConfig {} + } +} + fn run() -> Result<(), failure::Error> { let resources = Resources::new().loaded_from( "core", @@ -25,15 +34,27 @@ fn run() -> Result<(), failure::Error> { .with_watch(), ); - let res = resources.resource("shaders/quad.frag"); + let config = config::Config::new(resources.resource("Windows.toml")); + let windows_config = config.pick::("windows"); + + 'reload: loop { + - loop { - if let Some(p) = resources.new_changes() { - println!("res: {}", String::from_utf8_lossy(&res.get().unwrap())); - resources.notify_changes_synced(p); - } - ::std::thread::sleep_ms(500); +// let windows = winput::Windows::new()?; +// let window = windows.create(winput::WindowSettings::default()); +// let window = windows.create(winput::WindowSettings::default()); +// +// let res = resources.resource("shaders/quad.frag"); +// +// loop { +// if let Some(p) = resources.new_changes() { +// println!("res: {}", String::from_utf8_lossy(&res.get().unwrap())); +// resources.notify_changes_synced(p); +// } +// +// ::std::thread::sleep_ms(500); +// } } Ok(()) diff --git a/lib/config/Cargo.toml b/lib/config/Cargo.toml new file mode 100644 index 0000000..33fa92d --- /dev/null +++ b/lib/config/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "config" +version = "0.1.0" +authors = [] +edition = "2018" + +[dependencies] +failure = "0.1.3" +slab = "0.4" +metrohash = "1.0.6" +resources = { path = "../resources" } \ No newline at end of file diff --git a/lib/config/src/lib.rs b/lib/config/src/lib.rs new file mode 100644 index 0000000..abafc16 --- /dev/null +++ b/lib/config/src/lib.rs @@ -0,0 +1,76 @@ +use std::rc::Rc; +use std::cell::RefCell; + +pub struct Config { + shared: Rc>, +} + +impl Config { + pub fn new(res: resources::Resource) -> Config { + Config { + shared: Rc::new(RefCell::new(shared::InnerConfig::new(res))) + } + } + + pub fn pick(&self, name: &str) -> Pick + where T: Default + { + let (index, mut data) = self.shared.borrow_mut().pick(name) + .unwrap_or_else(|| panic!("config section {:?} is already in use", name)); + + let value = if data.is_none() { + T::default() + } else { + unimplemented!("parse value from data") + }; + + Pick { + value, + shared: self.shared.clone(), + } + } +} + +pub struct Pick { + value: T, + shared: Rc>, +} + +mod shared { + use slab::Slab; + use resources::Resource; + use metrohash::MetroHashMap; + + struct SlabData { + } + + pub struct InnerConfig { + sections: Slab, + section_name_index: MetroHashMap, + res: resources::Resource, + } + + impl InnerConfig { + pub fn new(res: Resource) -> InnerConfig { + InnerConfig { + sections: Slab::new(), + section_name_index: MetroHashMap::default(), + res + } + } + + pub fn pick(&mut self, section_name: &str) -> Option<(usize, Option)> { + let existing_section = self.section_name_index.get(section_name).map(|v| *v); + + match existing_section { + Some(_) => None, + None => { + let index = self.sections.insert(SlabData {}); + self.section_name_index.insert(section_name.to_string(), index); + + Some((index, None)) // TODO: load and return section config + } + } + } + } +} \ No newline at end of file diff --git a/lib/winput/Cargo.toml b/lib/winput/Cargo.toml index 6075f3b..4e488e4 100644 --- a/lib/winput/Cargo.toml +++ b/lib/winput/Cargo.toml @@ -5,3 +5,8 @@ authors = [] edition = "2018" [dependencies] +failure = "0.1.3" + +[dependencies.sdl2] +version = "0.31.0" +features = ["bundled", "static-link"] \ No newline at end of file diff --git a/lib/winput/src/lib.rs b/lib/winput/src/lib.rs index 217a4c4..0775b08 100644 --- a/lib/winput/src/lib.rs +++ b/lib/winput/src/lib.rs @@ -1,3 +1,19 @@ +#[macro_use] extern crate failure; + +#[derive(Fail, Debug)] +pub enum Error { + #[fail(display = "Failed to initialize windows: {}", _0)] + FailedToInitializeWindows(String), + #[fail(display = "Window height {} overflows", _0)] + HeightOverflows(u32), + #[fail(display = "Window width {} overflows", _0)] + WidthOverflows(u32), + #[fail(display = "Invalid window title")] + InvalidTitle, + #[fail(display = "Failed to create window: {}", _0)] + FailedToCreateWindow(String), +} + #[derive(Debug, Copy, Clone)] pub struct WindowDimensions { pub size: WindowSize, @@ -9,4 +25,110 @@ pub struct WindowDimensions { pub struct WindowSize { pub width: i32, pub height: i32, +} + +#[derive(Debug, Clone)] +pub struct WindowSettings { + pub dimensions: WindowDimensions, +} + +impl Default for WindowSettings { + fn default() -> Self { + WindowSettings { + dimensions: WindowDimensions { + size: WindowSize { + width: 960, + height: 600, + }, + hdpi_size: WindowSize { + width: 960, + height: 600, + }, + high_dpi: false, + } + } + } +} + +pub struct Window { + window: sdl2::video::Window, + settings: WindowSettings, +} + +pub struct Windows { + sdl: sdl2::Sdl, + video: sdl2::VideoSubsystem, +} + +fn sdl_windows_err(error: String) -> Error { + Error::FailedToInitializeWindows(error) +} + +fn sdl_window_err(error: sdl2::video::WindowBuildError) -> Error { + use sdl2::video::WindowBuildError; + + match error { + WindowBuildError::HeightOverflows(s) => Error::HeightOverflows(s), + WindowBuildError::WidthOverflows(s) => Error::WidthOverflows(s), + WindowBuildError::InvalidTitle(_) => Error::InvalidTitle, + WindowBuildError::SdlError(s) => Error::FailedToCreateWindow(s), + } +} + +impl Windows { + pub fn new() -> Result { + let sdl = sdl2::init().map_err(sdl_windows_err)?; + let video = sdl.video().map_err(sdl_windows_err)?; + + Ok(Windows { + sdl, + video, + }) + } + + pub fn create(&self, mut settings: WindowSettings) -> Result { + let gl_attr = self.video.gl_attr(); + gl_attr.set_context_profile(sdl2::video::GLProfile::Core); + gl_attr.set_context_version(4, 1); + gl_attr.set_accelerated_visual(true); + gl_attr.set_double_buffer(true); + gl_attr.set_multisample_buffers(1); + gl_attr.set_multisample_samples(16); + + let dims = &mut settings.dimensions; + + let mut window = self.video + .window("Demo", dims.size.width as u32, dims.size.height as u32); + let builder = window + .opengl() + .resizable(); + + if dims.high_dpi { + builder.allow_highdpi(); + } + + let mut window = builder.build().map_err(sdl_window_err)?; + + if dims.high_dpi { + let drawable_size = window.drawable_size(); + dims.hdpi_size.width = drawable_size.0 as i32; + dims.hdpi_size.height = drawable_size.1 as i32; + } else { + dims.hdpi_size.width = dims.size.width; + dims.hdpi_size.height = dims.size.height; + } + + let mut scale = dims.hdpi_size.width as f32 / dims.size.width as f32; + let mut scale_modifier = 1.0; + +// let _gl_context = window.gl_create_context().map_err(sdl_err)?; +// let gl = gl::Gl::load_with(|s| { +// video_subsystem.gl_get_proc_address(s) as *const std::os::raw::c_void +// }); + + Ok(Window { + window, + settings, + }) + } } \ No newline at end of file From 772e748808f15a7d00c17b0bf56eb749e6b6d11f Mon Sep 17 00:00:00 2001 From: Nerijus Arlauskas Date: Wed, 5 Dec 2018 15:20:36 +0200 Subject: [PATCH 7/8] Small fix for mac --- lib/resources/src/backend/filesystem.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/resources/src/backend/filesystem.rs b/lib/resources/src/backend/filesystem.rs index 31e791b..e774c2f 100644 --- a/lib/resources/src/backend/filesystem.rs +++ b/lib/resources/src/backend/filesystem.rs @@ -70,6 +70,14 @@ mod watch_impl { warn!("unrecognised resource path {:?} for {} event", path, "Write") } }, + DebouncedEvent::Chmod(path) => { + if let Some(resource_path) = ResourcePathBuf::from_filesystem_path(&self.root_path, &path) { + queue.push_back(Modification::Write(resource_path)); + something_outdated = true; + } else { + warn!("unrecognised resource path {:?} for {} event", path, "Write") + } + }, DebouncedEvent::Remove(path) => { if let Some(resource_path) = ResourcePathBuf::from_filesystem_path(&self.root_path, &path) { queue.push_back(Modification::Remove(resource_path)); From b33d6e1c357d0467484b3c179c3eb8e4f9ca1b64 Mon Sep 17 00:00:00 2001 From: Nerijus Arlauskas Date: Wed, 12 Dec 2018 01:31:05 +0200 Subject: [PATCH 8/8] Persist simple struct to config --- Cargo.lock | 44 ++++++ lesson-25-x-terrain/Cargo.toml | 2 + lesson-25-x-terrain/core/Windows.toml | 4 + lesson-25-x-terrain/src/main.rs | 34 ++++- lib/config/Cargo.toml | 2 + lib/config/src/lib.rs | 98 ++++++++------ lib/config/src/shared/mod.rs | 171 ++++++++++++++++++++++++ lib/config/src/shared/paths.rs | 61 +++++++++ lib/resources/src/backend/filesystem.rs | 7 +- 9 files changed, 378 insertions(+), 45 deletions(-) create mode 100644 lib/config/src/shared/mod.rs create mode 100644 lib/config/src/shared/paths.rs diff --git a/Cargo.lock b/Cargo.lock index ee389e0..d564369 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -47,6 +47,11 @@ dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ascii" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "atty" version = "0.2.11" @@ -178,6 +183,16 @@ name = "cfg-if" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "chrono" +version = "0.4.6" +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)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cloudabi" version = "0.0.3" @@ -213,14 +228,28 @@ name = "color_quant" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "combine" +version = "3.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ascii 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "config" version = "0.1.0" dependencies = [ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "metrohash 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "resources 0.1.0", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "toml_edit 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1233,6 +1262,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "resources 0.1.0", "sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", + "toml_edit 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "winput 0.1.0", ] @@ -2867,6 +2897,16 @@ dependencies = [ "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "toml_edit" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "combine 3.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "try-lock" version = "0.1.0" @@ -3125,6 +3165,7 @@ dependencies = [ "checksum approx 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f71f10b5c4946a64aad7b8cf65e3406cd3da22fc448595991d22423cf6db67b4" "checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392" "checksum arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f405cc4c21cd8b784f6c8fc2adf9bc00f59558f0049b5ec21517f875963040cc" +"checksum ascii 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a5fc969a8ce2c9c0c4b0429bb8431544f6658283c8326ba5ff8c762b75369335" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" "checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" @@ -3143,10 +3184,12 @@ dependencies = [ "checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" "checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" +"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cmake 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "6ec65ee4f9c9d16f335091d23693457ed4928657ba4982289d7fafee03bc614a" "checksum cocoa 0.18.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cf79daa4e11e5def06e55306aa3601b87de6b5149671529318da048f67cdd77b" "checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" +"checksum combine 3.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "db733c5d0f4f52e78d4417959cadf0eecc7476e7f9ece05677912571a4af34e2" "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" "checksum core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25bfd746d203017f7d5cbd31ee5d8e17f94b6521c7af77ece6c9e4b2d4b16c67" "checksum core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4e2640d6d0bf22e82bed1b73c6aef8d5dd31e5abe6666c57e6d45e2649f4f887" @@ -3378,6 +3421,7 @@ dependencies = [ "checksum tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "772f4b04e560117fe3b0a53e490c16ddc8ba6ec437015d91fa385564996ed913" "checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" "checksum tokio-uds 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "99ce87382f6c1a24b513a72c048b2c8efe66cb5161c9061d00bee510f08dc168" +"checksum toml_edit 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "49f417ffef0480dcd2db983b67b4d07c49147da72b4c3b65db0348f5cfccb929" "checksum try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2aa4715743892880f70885373966c83d73ef1b0838a664ef0c76fffd35e7c2" "checksum twox-hash 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4f85be565a110ed72ed7048cf56570db04ce0a592c98aa59b7dacde3e5718750" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" diff --git a/lesson-25-x-terrain/Cargo.toml b/lesson-25-x-terrain/Cargo.toml index 5554b0c..8ed3bc2 100644 --- a/lesson-25-x-terrain/Cargo.toml +++ b/lesson-25-x-terrain/Cargo.toml @@ -15,6 +15,8 @@ failure = "0.1.3" env_logger = "*" log = "0.4.6" +toml_edit = "0.1.3" + [dependencies.sdl2] version = "0.31.0" features = ["bundled", "static-link"] diff --git a/lesson-25-x-terrain/core/Windows.toml b/lesson-25-x-terrain/core/Windows.toml index e69de29..ab7efab 100644 --- a/lesson-25-x-terrain/core/Windows.toml +++ b/lesson-25-x-terrain/core/Windows.toml @@ -0,0 +1,4 @@ + +[windows] +width = 800 +height = 600 diff --git a/lesson-25-x-terrain/src/main.rs b/lesson-25-x-terrain/src/main.rs index 6c858af..c23ad1f 100644 --- a/lesson-25-x-terrain/src/main.rs +++ b/lesson-25-x-terrain/src/main.rs @@ -4,6 +4,7 @@ use resources::{ backend::FileSystem }; use winput; +use toml_edit as toml; mod debug; @@ -16,12 +17,35 @@ fn main() { } struct WindowsConfig { + width: i32, + height: i32, +} + +impl config::ConfigItem for WindowsConfig { + fn serialize(&self, item: &mut toml::Item) { + let table = match item.as_table_mut() { + Some(table) => table, + None => { + *item = toml::table(); + item.as_table_mut().unwrap() + } + }; + + config::ConfigItem::serialize(&self.width, &mut table.entry("width")); + config::ConfigItem::serialize(&self.height, &mut table.entry("height")); + } + fn deserialize(&mut self, item: &toml::Item) { + + } } impl Default for WindowsConfig { fn default() -> Self { - WindowsConfig {} + WindowsConfig { + width: 800, + height: 600, + } } } @@ -35,11 +59,13 @@ fn run() -> Result<(), failure::Error> { ); let config = config::Config::new(resources.resource("Windows.toml")); - let windows_config = config.pick::("windows"); + let mut windows_config = config.pick::(&["windows"]); + windows_config.modify(|v| ()); 'reload: loop { - - + if config.should_persist() { + config.persist()?; + } // let windows = winput::Windows::new()?; // let window = windows.create(winput::WindowSettings::default()); diff --git a/lib/config/Cargo.toml b/lib/config/Cargo.toml index 33fa92d..7016a56 100644 --- a/lib/config/Cargo.toml +++ b/lib/config/Cargo.toml @@ -8,4 +8,6 @@ edition = "2018" failure = "0.1.3" slab = "0.4" metrohash = "1.0.6" +toml_edit = "0.1.3" +log = "0.4.6" resources = { path = "../resources" } \ No newline at end of file diff --git a/lib/config/src/lib.rs b/lib/config/src/lib.rs index abafc16..bf9913c 100644 --- a/lib/config/src/lib.rs +++ b/lib/config/src/lib.rs @@ -1,5 +1,27 @@ use std::rc::Rc; use std::cell::RefCell; +use toml_edit as toml; + +mod shared; + +impl ConfigItem for i32 { + fn serialize(&self, item: &mut toml::Item) { + *item = toml::value(*self as i64) + } + + fn deserialize(&mut self, item: &toml::Item) { + if let Some(v) = item.as_integer() { + if v <= std::i32::MAX as i64 { + *self = v as i32; + } + } + } +} + +pub trait ConfigItem { + fn serialize(&self, item: &mut toml::Item); + fn deserialize(&mut self, item: &toml::Item); +} pub struct Config { shared: Rc>, @@ -12,65 +34,63 @@ impl Config { } } - pub fn pick(&self, name: &str) -> Pick - where T: Default + pub fn pick(&self, path: &[&str]) -> Pick + where T: Default + ConfigItem { - let (index, mut data) = self.shared.borrow_mut().pick(name) - .unwrap_or_else(|| panic!("config section {:?} is already in use", name)); + let mut shared = self.shared.borrow_mut(); + let (slot, data) = shared.pick_create(path); - let value = if data.is_none() { - T::default() - } else { - unimplemented!("parse value from data") + let value = match data { + None => T::default(), + Some(item) => { + let mut value = T::default(); + value.deserialize(item); + value + } }; Pick { value, + slot, shared: self.shared.clone(), } } + + pub fn should_persist(&self) -> bool { + let shared = self.shared.borrow(); + shared.should_persist() + } + + pub fn persist(&self) -> Result<(), resources::Error> { + let mut shared = self.shared.borrow_mut(); + shared.persist() + } } pub struct Pick { value: T, + slot: usize, shared: Rc>, } -mod shared { - use slab::Slab; - use resources::Resource; - use metrohash::MetroHashMap; - - struct SlabData { - } - - pub struct InnerConfig { - sections: Slab, - section_name_index: MetroHashMap, - res: resources::Resource, +impl Pick where T: ConfigItem { + pub fn is_modified(&self) -> bool { + false } - impl InnerConfig { - pub fn new(res: Resource) -> InnerConfig { - InnerConfig { - sections: Slab::new(), - section_name_index: MetroHashMap::default(), - res - } + pub fn modify(&mut self, mut fun: impl FnMut(&mut T)) { + fun(&mut self.value); + let mut shared = self.shared.borrow_mut(); + if let Some(item) = shared.pick_mut(self.slot) { + self.value.serialize(item) } + } +} - pub fn pick(&mut self, section_name: &str) -> Option<(usize, Option)> { - let existing_section = self.section_name_index.get(section_name).map(|v| *v); - - match existing_section { - Some(_) => None, - None => { - let index = self.sections.insert(SlabData {}); - self.section_name_index.insert(section_name.to_string(), index); +impl std::ops::Deref for Pick { + type Target = T; - Some((index, None)) // TODO: load and return section config - } - } - } + fn deref(&self) -> &Self::Target { + &self.value } } \ No newline at end of file diff --git a/lib/config/src/shared/mod.rs b/lib/config/src/shared/mod.rs new file mode 100644 index 0000000..3ec59b2 --- /dev/null +++ b/lib/config/src/shared/mod.rs @@ -0,0 +1,171 @@ +mod paths; + +use slab::Slab; +use resources::Resource; +use toml_edit as toml; +use log::*; + +struct PickData { + path: paths::Path, + should_deserialize: bool, +} + +struct Contents { + doc: Option, +} + +impl Contents { + pub fn new() -> Contents { + Contents { + doc: None, + } + } + + fn load_if_not_loaded(&mut self, res: &resources::Resource) { + if self.doc.is_none() { + self.reload(res); + } + } + + fn reload(&mut self, res: &resources::Resource) { + self.doc = res.get().map_err(|e| error!("resource error: {:?}", e)) + .ok() + .and_then(|bytes| + String::from_utf8(bytes) + .map_err(|e| error!("resource did not contain valid unicode: {:?}", e)) + .ok() + ) + .and_then(|string| + string.parse::() + .map_err(|e| error!("failed to parse toml: {:?}", e)) + .ok() + ); + } + + fn item_at<'a, 'e>(&'a mut self, res: &resources::Resource, path: impl Iterator) -> Option<&'a toml::Item> { + self.load_if_not_loaded(res); + self.doc + .as_ref() + .and_then(move |doc| table_path_to_item(doc.as_table(), path)) + } + + fn item_at_mut<'a, 'e>(&'a mut self, res: &resources::Resource, path: impl Iterator) -> Option<&'a mut toml::Item> { + self.load_if_not_loaded(res); + self.doc + .as_mut() + .and_then(move |doc| table_path_to_item_mut(doc.as_table_mut(), path)) + } +} + +pub struct InnerConfig { + picks: Slab, + + path_storage: paths::Storage, + + res: resources::Resource, + contents: Contents, + + has_new_changes_to_persist: bool, + has_not_reloaded_picks: bool, +} + +impl InnerConfig { + pub fn new(res: Resource) -> InnerConfig { + InnerConfig { + picks: Slab::new(), + path_storage: paths::Storage::new(), + res, + contents: Contents::new(), + has_new_changes_to_persist: false, + has_not_reloaded_picks: false, + } + } + + pub fn should_persist(&self) -> bool { + self.has_new_changes_to_persist + } + + pub fn persist(&mut self) -> Result<(), resources::Error> { + let data = self.contents.doc.as_ref().map(|doc| doc.to_string()); + if let Some(data) = data { + self.res.write(data.as_bytes())?; + } + + self.has_new_changes_to_persist = false; + + Ok(()) + } + + pub fn pick_create<'a, 'e>(&'a mut self, path: &'e [&'e str]) -> (usize, Option<&'a toml::Item>) { + let pick_slot = self.picks.insert(PickData { + path: paths::Path::new(&mut self.path_storage, path), + should_deserialize: false, + }); + + (pick_slot, self.contents.item_at(&self.res, path.iter().map(|i| *i))) + } + + pub fn pick_mut(&mut self, slot: usize) -> Option<&mut toml::Item> { + self.has_new_changes_to_persist = true; + self.should_reload_others_except(slot); + + let path = self.picks.get(slot).map(|p| &p.path)?; + let iter = path.components(&self.path_storage); + self.contents.item_at_mut(&self.res, iter) + } + + fn should_reload_others_except(&mut self, slot: usize) { + let mut has_not_reloaded_picks = false; + for (other_slot, pick_data) in self.picks.iter_mut() { + if other_slot != slot { + pick_data.should_deserialize = true; + has_not_reloaded_picks = true; + } + } + + if has_not_reloaded_picks { + self.has_not_reloaded_picks = true; + } + } +} + +fn table_path_to_item<'a, 'e>(table: &'a toml::Table, mut iter: impl Iterator) -> Option<&'a toml::Item> { + let next = iter.next(); + match next { + Some(key) => table.get(key) + .and_then(|item| item_path_to_item(item, iter)), + None => None, + } +} + +fn table_path_to_item_mut<'a, 'e>(table: &'a mut toml::Table, mut iter: impl Iterator) -> Option<&'a mut toml::Item> { + let next = iter.next(); + match next { + Some(key) => Some(item_path_to_item_mut(table.entry(key), iter)), + None => None, + } +} + +fn item_path_to_item<'a, 'e>(item: &'a toml::Item, mut iter: impl Iterator) -> Option<&'a toml::Item> { + let next = iter.next(); + match next { + Some(key) => match item { + toml::Item::Table(t) => t.get(key).and_then(|item| item_path_to_item(item, iter)), + _ => None, + }, + None => Some(item), + } +} + +fn item_path_to_item_mut<'a, 'e>(item: &'a mut toml::Item, mut iter: impl Iterator) -> &'a mut toml::Item { + let next = iter.next(); + match next { + Some(key) => { + if !item.is_table() { + *item = toml::Item::Table(toml::Table::new()); + } + item_path_to_item_mut(item.as_table_mut().unwrap().entry(key), iter) + }, + None => item, + } +} \ No newline at end of file diff --git a/lib/config/src/shared/paths.rs b/lib/config/src/shared/paths.rs new file mode 100644 index 0000000..ae3d4b0 --- /dev/null +++ b/lib/config/src/shared/paths.rs @@ -0,0 +1,61 @@ +use metrohash::MetroHashMap; +use slab::Slab; + +const MAX_PATH_LEN: usize = 32; + +#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct NameSlot(usize); + +pub struct Storage { + path_names_index: Slab, + path_names: MetroHashMap, +} + +impl Storage { + pub fn new() -> Storage { + Storage { + path_names_index: Slab::new(), + path_names: MetroHashMap::default(), + } + } + + pub fn name_slot(&mut self, component: &str) -> NameSlot { + match self.path_names.get(component).map(|v| *v) { + None => { + let index = self.path_names_index.insert(component.to_string()); + self.path_names.insert(component.to_string(), NameSlot(index)); + NameSlot(index) + }, + Some(s) => s, + } + } +} + +pub struct Path { + path: [NameSlot; MAX_PATH_LEN], + path_len: usize, +} + +impl Path { + pub fn new(storage: &mut Storage, str_path: &[&str]) -> Path { + if str_path.len() > MAX_PATH_LEN { + unimplemented!("config path length exceeded"); + } + + let mut output_path = [NameSlot(0); MAX_PATH_LEN]; + for (&component, output_path_component) in str_path.iter().zip(output_path.iter_mut()) { + *output_path_component = storage.name_slot(component); + } + + Path { + path: output_path, + path_len: str_path.len(), + } + } + + pub fn components<'r>(&'r self, storage: &'r Storage) -> impl Iterator + 'r { + self.path.iter() + .take(self.path_len) + .map(move |slot| storage.path_names_index[slot.0].as_str()) + } +} diff --git a/lib/resources/src/backend/filesystem.rs b/lib/resources/src/backend/filesystem.rs index e774c2f..3aee0b3 100644 --- a/lib/resources/src/backend/filesystem.rs +++ b/lib/resources/src/backend/filesystem.rs @@ -201,8 +201,11 @@ impl Backend for FileSystem { Ok(()) } - fn write_from(&mut self, _path: &ResourcePath, _buffer: &mut io::Read) -> Result<(), Error> { - unimplemented!() + fn write_from(&mut self, path: &ResourcePath, mut input: &mut io::Read) -> Result<(), Error> { + let path = resource_name_to_path(&self.root_path, path); + let mut writer = io::BufWriter::new(fs::OpenOptions::new().write(true).append(false).create(true).open(path)?); + io::copy(&mut input, &mut writer)?; + Ok(()) } }