diff --git a/.circleci/config.yml b/.circleci/config.yml index e2905a42523..ea0a99bd73b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -89,7 +89,7 @@ jobs: - restore_cache: keys: - v8-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }} - - v8-cargo-cache-darwin-stable-{{ arch }} + # - v8-cargo-cache-darwin-stable-{{ arch }} - run: name: Install crate dependencies command: | @@ -372,7 +372,6 @@ jobs: -d build_parameters[CIRCLE_JOB]=bench \ https://circleci.com/api/v1.1/project/github/wasmerio/wasmer-bench/tree/master fi - workflows: version: 2 main: diff --git a/Cargo.lock b/Cargo.lock index 4a0e4d5d0a9..7edac3c951c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,13 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -[[package]] -name = "MacTypes-sys" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "adler32" version = "1.0.3" @@ -62,8 +54,8 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -80,8 +72,8 @@ dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -90,8 +82,8 @@ name = "backtrace-sys" version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -111,15 +103,15 @@ dependencies = [ "cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -139,15 +131,6 @@ dependencies = [ "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "blob" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "build_const" version = "0.2.1" @@ -173,7 +156,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bzip2-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -181,8 +164,8 @@ name = "bzip2-sys" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -198,7 +181,7 @@ name = "capstone-sys" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -208,24 +191,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cbindgen" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.34" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -250,20 +233,20 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clap" -version = "2.32.0" +version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -278,10 +261,10 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.38" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -290,22 +273,47 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "core-foundation" -version = "0.5.1" +name = "cookie" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "core-foundation-sys" +name = "cookie_store" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "core-foundation" +version = "0.6.4" +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.54 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "core-foundation-sys" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cranelift-bforest" version = "0.30.0" @@ -394,23 +402,25 @@ dependencies = [ [[package]] name = "criterion" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion-plot 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "csv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -418,7 +428,7 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -498,13 +508,13 @@ dependencies = [ [[package]] name = "csv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "csv-core 0.1.5 (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.90 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -525,21 +535,21 @@ dependencies = [ [[package]] name = "dtoa" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "dynasm" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -582,7 +592,7 @@ dependencies = [ "atty 0.2.11 (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.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -592,7 +602,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -602,7 +612,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "error-chain" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -619,9 +638,9 @@ name = "failure_derive" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -632,12 +651,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "filetime" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -646,7 +665,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -689,7 +708,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -697,7 +716,7 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -739,13 +758,13 @@ dependencies = [ [[package]] name = "h2" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -761,7 +780,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -784,7 +803,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -802,27 +821,27 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.25" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.17 (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)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -833,9 +852,9 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.28 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -862,7 +881,7 @@ dependencies = [ "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "enum-methods 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "inkwell_internal_macros 0.1.0 (git+https://github.com/wasmerio/inkwell?branch=llvm7-0)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "llvm-sys 70.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -871,8 +890,8 @@ name = "inkwell_internal_macros" version = "0.1.0" source = "git+https://github.com/wasmerio/inkwell?branch=llvm7-0#a14e62977504ef574dc2e933edc559cc79781ca7" dependencies = [ - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -880,7 +899,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -894,9 +913,13 @@ dependencies = [ [[package]] name = "itoa" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "kernel-net" +version = "0.1.0" + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -918,12 +941,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.51" +version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libflate" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -936,7 +959,7 @@ name = "libloading" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -945,8 +968,8 @@ name = "linked-hash-map" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_test 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_test 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -954,10 +977,10 @@ name = "llvm-sys" version = "70.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -983,7 +1006,7 @@ name = "lz4" version = "1.23.1" source = "git+https://github.com/zboxfs/lz4-rs.git#4704144553d827a96d4fedeb683dbde1360e06e3" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "lz4-sys 1.8.3 (git+https://github.com/zboxfs/lz4-rs.git)", ] @@ -992,8 +1015,8 @@ name = "lz4-sys" version = "1.8.3" source = "git+https://github.com/zboxfs/lz4-rs.git#4704144553d827a96d4fedeb683dbde1360e06e3" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1006,7 +1029,7 @@ name = "memchr" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1014,7 +1037,7 @@ name = "memmap" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1023,7 +1046,7 @@ name = "memmap" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1037,7 +1060,7 @@ name = "mime" version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1064,9 +1087,9 @@ name = "miniz_oxide_c_api" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (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.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1080,7 +1103,7 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (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.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1101,18 +1124,18 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.22 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.46 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1122,7 +1145,7 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1132,9 +1155,9 @@ 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)", - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1144,9 +1167,9 @@ version = "0.13.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)", - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1182,20 +1205,25 @@ name = "num_cpus" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "numtoa" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "openssl" -version = "0.10.20" +version = "0.10.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (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.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.46 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1205,13 +1233,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.43" +version = "0.9.46" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1237,7 +1265,7 @@ version = "0.4.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)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1255,7 +1283,7 @@ name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.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.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1328,12 +1356,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" -version = "0.4.27" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "publicsuffix" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "quick-error" version = "1.2.2" @@ -1346,10 +1386,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1358,7 +1398,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1370,12 +1410,12 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.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_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1422,10 +1462,10 @@ dependencies = [ [[package]] name = "rand_jitter" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1437,7 +1477,7 @@ 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-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1475,7 +1515,7 @@ version = "6.1.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)", - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1496,7 +1536,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.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1510,7 +1550,7 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.52" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1518,12 +1558,12 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1551,28 +1591,31 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.9.13" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie_store 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.28 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.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.13 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1594,12 +1637,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rmp 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-demangle" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1612,7 +1655,7 @@ dependencies = [ [[package]] name = "ryu" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1651,30 +1694,28 @@ name = "scroll_derive" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework" -version = "0.2.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" -version = "0.2.3" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "MacTypes-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1692,10 +1733,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1704,7 +1745,7 @@ version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1712,17 +1753,17 @@ name = "serde_bytes" version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1730,27 +1771,27 @@ name = "serde_json" version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "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.90 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_test" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_urlencoded" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1781,7 +1822,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "strsim" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1789,7 +1830,7 @@ name = "structopt" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1799,9 +1840,9 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1816,11 +1857,11 @@ dependencies = [ [[package]] name = "syn" -version = "0.15.30" +version = "0.15.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1837,9 +1878,9 @@ name = "synstructure" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1850,12 +1891,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "tar" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1884,9 +1925,9 @@ version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1901,17 +1942,18 @@ dependencies = [ [[package]] name = "termion" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "textwrap" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1930,8 +1972,8 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1940,24 +1982,25 @@ name = "tinytemplate" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (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.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1967,7 +2010,7 @@ name = "tokio-current-thread" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1977,7 +2020,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1986,7 +2029,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1996,7 +2039,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.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)", @@ -2005,16 +2048,16 @@ dependencies = [ "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-sync" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2023,7 +2066,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (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.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2032,13 +2075,13 @@ dependencies = [ [[package]] name = "tokio-threadpool" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (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.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2052,7 +2095,7 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2070,7 +2113,7 @@ name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2078,6 +2121,14 @@ name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "try_from" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "typenum" version = "1.10.0" @@ -2098,7 +2149,7 @@ dependencies = [ [[package]] name = "unicase" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2188,8 +2239,8 @@ name = "wabt" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "wabt-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2199,8 +2250,8 @@ name = "wabt-sys" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", - "cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2219,7 +2270,7 @@ name = "want" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.27 (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.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2228,6 +2279,7 @@ dependencies = [ name = "wasmer" version = "0.4.1" dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2236,6 +2288,7 @@ dependencies = [ "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-clif-backend 0.4.1", "wasmer-emscripten 0.4.1", + "wasmer-kernel-loader 0.1.0", "wasmer-llvm-backend 0.4.1", "wasmer-middleware-common 0.4.1", "wasmer-runtime 0.4.1", @@ -2255,13 +2308,13 @@ dependencies = [ "cranelift-native 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-wasm 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde-bench 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "target-lexicon 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.4.1", "wasmer-win-exception-handler 0.4.1", @@ -2276,7 +2329,7 @@ dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2286,19 +2339,27 @@ dependencies = [ "wasmer-singlepass-backend 0.4.1", ] +[[package]] +name = "wasmer-kernel-loader" +version = "0.1.0" +dependencies = [ + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmer-runtime-core 0.4.1", +] + [[package]] name = "wasmer-llvm-backend" version = "0.4.1" dependencies = [ "capstone 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "goblin 0.0.20 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "inkwell 0.1.0 (git+https://github.com/wasmerio/inkwell?branch=llvm7-0)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2318,7 +2379,7 @@ dependencies = [ name = "wasmer-runtime" version = "0.4.1" dependencies = [ - "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2335,21 +2396,21 @@ version = "0.4.1" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.4.1", "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)", "zbox 0.6.1 (git+https://github.com/wasmerio/zbox?branch=bundle-libsodium)", - "zstd 0.4.22+zstd.1.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd 0.4.24+zstd.1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmer-runtime-c-api" version = "0.4.1" dependencies = [ - "cbindgen 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cbindgen 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime 0.4.1", "wasmer-runtime-core 0.4.1", ] @@ -2366,15 +2427,15 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "page_size 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde-bench 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2385,11 +2446,11 @@ name = "wasmer-singlepass-backend" version = "0.4.1" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "dynasm 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "dynasm 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "dynasmrt 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.4.1", @@ -2414,7 +2475,7 @@ dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "generational-arena 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.4.1", @@ -2425,9 +2486,9 @@ name = "wasmer-win-exception-handler" version = "0.4.1" dependencies = [ "bindgen 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.4.1", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2443,7 +2504,7 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2506,74 +2567,72 @@ name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "zbox" version = "0.6.1" -source = "git+https://github.com/wasmerio/zbox?branch=bundle-libsodium#113c62bf3f94124c4978959043efcf98222fa626" +source = "git+https://github.com/wasmerio/zbox?branch=bundle-libsodium#2636be2907eddfdaa23e1cd385416e804663a2dd" dependencies = [ "android_logger 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libflate 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libflate 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lz4 1.23.1 (git+https://github.com/zboxfs/lz4-rs.git)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.13 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.9.16 (registry+https://github.com/rust-lang/crates.io-index)", "rmp-serde 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "zip 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "zip 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "zip" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libflate 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libflate 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "zstd" -version = "0.4.22+zstd.1.3.8" +version = "0.4.24+zstd.1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "zstd-safe 1.4.7+zstd.1.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd-safe 1.4.9+zstd.1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "zstd-safe" -version = "1.4.7+zstd.1.3.8" +version = "1.4.9+zstd.1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "zstd-sys 1.4.8+zstd.1.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd-sys 1.4.10+zstd.1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "zstd-sys" -version = "1.4.8+zstd.1.3.8" +version = "1.4.10+zstd.1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "blob 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] -"checksum MacTypes-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eaf9f0d0b1cc33a4d2aee14fb4b2eac03462ef4db29c8ac4057327d8a71ad86f" "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" "checksum android_log-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" @@ -2589,7 +2648,6 @@ dependencies = [ "checksum bindgen 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8f7f7f0701772b17de73e4f5cbcb1dd6926f4706cba4c1ab62c5367f8bdc94e1" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum blake2b_simd 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce2571a6cd634670daa2977cc894c1cc2ba57c563c498e5a82c35446f34d056e" -"checksum blob 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19803aa44ff8b43123bbe369efaddcb638ea7dc332e543972dd95ac7cb148b92" "checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" @@ -2598,17 +2656,19 @@ dependencies = [ "checksum capstone 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00be9d203fa0e078b93b24603633fb081851dfe0c1086364431f52587a47157e" "checksum capstone-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2dc8d32bc5c1e6d0fcde10af411c98b07d93498d51654f678757f08fa2acd6a6" "checksum cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "926013f2860c46252efceabb19f4a6b308197505082c609025aa6706c011d427" -"checksum cbindgen 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "31f70db109be74a3dfcb0af4d0d191e52230351477f14c2ed10707c2b0dcfa2e" -"checksum cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "30f813bf45048a18eda9190fd3c6b78644146056740c43172a5a3699118588fd" +"checksum cbindgen 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1f861ef68cabbb271d373a7795014052bff37edce22c620d95e395e8719d7dc5" +"checksum cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a0c56216487bb80eec9c4516337b2588a4f2a2290d72a1416d930e4dcdb0c90d" "checksum cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7fa24eb00d5ffab90eaeaf1092ac85c04c64aaf358ea6f84505b8116d24c6af" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ef0c1bcf2e99c649104bd7a7012d8f8802684400e03db0ec0af48583c6fa0e4" -"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" +"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "96210eec534fc3fbfc0452a63769424eaa80205fda6cea98e5b61cb3d97bcec8" +"checksum cmake 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "d9fc5523427cb1451da064f7db483d18bf8957e471baabf140ff683c37a86536" "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" -"checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" -"checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" +"checksum cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99be24cfcf40d56ed37fd11c2123be833959bbc5bddecb46e1c2e442e15fa3e0" +"checksum cookie_store 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b0d2f2ecb21dce00e2453268370312978af9b8024020c7a37ae2cc6dbbe64685" +"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum cranelift-bforest 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e5a357d20666bf4a8c2d626a19f1b59dbca66cd844fb1e66c5612254fd0f7505" "checksum cranelift-codegen 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab00cb149a5bb0f7e6dd391357356a5d71c335a431e8eece94f32da2d5a043f7" "checksum cranelift-codegen-meta 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3797a2f450ac71297e083dd440d0cdd0d3bceabe4a3ca6bcb9e4077e9c0327d" @@ -2618,8 +2678,8 @@ dependencies = [ "checksum cranelift-wasm 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740ebfba28c8433f06750f84819f1eb663ea9f5e4b9a81c01f4e52262d868b56" "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "1c6e5ee5b9652d4f851418c448af105642e1f99e9a2741a8ff45c0d2c911b1e0" -"checksum criterion-plot 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4107e4a5abb94267e0149922b8ff49dc70a87cc202820fdbfc0d3e1edbdc4b16" +"checksum criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0363053954f3e679645fc443321ca128b7b950a6fe288cf5f9335cc22ee58394" +"checksum criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76f9212ddf2f4a9eb2d401635190600656a1f88a932ef53d06e7fa4c7e02fb8e" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" @@ -2627,11 +2687,11 @@ dependencies = [ "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" -"checksum csv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f0782c7154d8dd08f4adeb5aa22ab178c10281915f7da68d10bb646f03aaee73" +"checksum csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9044e25afb0924b5a5fc5511689b0918629e85d68ea591e5e87fbf1e85ea1b3b" "checksum csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5cdef62f37e6ffe7d1f07a381bc0db32b7a3ff1cac0de56cb0d81e71f53d65" "checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" -"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" -"checksum dynasm 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b77e128faecc4d16cff7cae96c0c9e809f687f748a0dbc4d017996e48240a991" +"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" +"checksum dynasm 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f36d49ab6f8ecc642d2c6ee10fda04ba68003ef0277300866745cdde160e6b40" "checksum dynasmrt 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c408a211e7f5762829f5e46bdff0c14bc3b1517a21a4bb781c716bf88b0c68" "checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" "checksum encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)" = "4155785c79f2f6701f185eb2e6b4caf0555ec03477cb4c70db67b465311620ed" @@ -2639,10 +2699,11 @@ dependencies = [ "checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" "checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" +"checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum field-offset 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "64e9bc339e426139e02601fa69d101e96a92aee71b58bc01697ec2a63a5c9e68" -"checksum filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a2df5c1a8c4be27e7707789dc42ae65976e60b394afd293d1419ab915833e646" +"checksum filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2f8c63033fcba1f51ef744505b3cad42510432b904c062afa67ad7ece008429d" "checksum flate2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f87e68aa82b2de08a6e037f1385455759df6e445a8df5e005b4297191dbf18aa" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" @@ -2650,21 +2711,21 @@ dependencies = [ "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "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.26 (registry+https://github.com/rust-lang/crates.io-index)" = "62941eff9507c8177d448bd83a44d9b9760856e184081d8cd79ba9f03dd24981" +"checksum futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)" = "a2037ec1c6c1c4f79557762eab1f7eae1f64f6cb418ace90fae88f0942b60139" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum generational-arena 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4024f96ffa0ebaaf36aa589cd41f2fd69f3a5e6fd02c86e11e12cdf41d5b46a3" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum goblin 0.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "84473a5302fa5094d3d9911c2f312f522f9a37462a777f195f63fae1bf7faf4d" -"checksum h2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "910a5e7be6283a9c91b3982fa5188368c8719cce2a3cf3b86048673bf9d9c36b" +"checksum h2 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "85ab6286db06040ddefb71641b50017c06874614001a134b423783e2db2920bd" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" "checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a" "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.12.25 (registry+https://github.com/rust-lang/crates.io-index)" = "7d5b6658b016965ae301fa995306db965c93677880ea70765a84235a96eae896" +"checksum hyper 0.12.28 (registry+https://github.com/rust-lang/crates.io-index)" = "e8e4606fed1c162e3a63d408c07584429f49a4f34c7176cb6cbee60e78f2372c" "checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" @@ -2672,12 +2733,12 @@ dependencies = [ "checksum inkwell_internal_macros 0.1.0 (git+https://github.com/wasmerio/inkwell?branch=llvm7-0)" = "" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" -"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" -"checksum libflate 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "7346a83e8a2c3958d44d24225d905385dc31fc16e89dffb356c457b278914d20" +"checksum libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)" = "c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6" +"checksum libflate 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "c52384aeb22d0ce82a10d8ddf35f7fb4717d1b23eac5b94cd38d2050fb53766a" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum llvm-sys 70.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60a9ee82fe0fa72ae6ef6d018b407296085863836451c7a97384f84ed7e26b9f" @@ -2696,7 +2757,7 @@ dependencies = [ "checksum miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7fe927a42e3807ef71defb191dc87d4e24479b221e67015fe38ae2b7b447bab" "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8e08de0070bbf4c31f452ea2a70db092f36f6f2e4d897adf5674477d488fb2" +"checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nix 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "921f61dc817b379d0834e45d5ec45beaacfae97082090a49c2cf30dcbc30206f" "checksum nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46f0f3210768d796e8fa79ec70ee6af172dacbe7147f5e69be5240a47778302b" @@ -2705,9 +2766,10 @@ dependencies = [ "checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" -"checksum openssl 0.10.20 (registry+https://github.com/rust-lang/crates.io-index)" = "5a0d6b781aac4ac1bd6cafe2a2f0ad8c16ae8e1dd5184822a16c50139f8838d9" +"checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" +"checksum openssl 0.10.22 (registry+https://github.com/rust-lang/crates.io-index)" = "a51f452b82d622fc8dd973d7266e9055ac64af25b957d9ced3989142dc61cb6b" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)" = "33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d" +"checksum openssl-sys 0.9.46 (registry+https://github.com/rust-lang/crates.io-index)" = "05636e06b4f8762d4b81d24a351f3966f38bd25ccbcfd235606c91fdb82cc60f" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum page_size 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f89ef58b3d32420dbd1a43d2f38ae92f6239ef12bb556ab09ca55445f5a67242" @@ -2722,10 +2784,11 @@ dependencies = [ "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" "checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" -"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" +"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +"checksum publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5afecba86dcf1e4fd610246f89899d1924fe12e1e89f555eb7c7f710f3c5ad1d" "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.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" @@ -2733,7 +2796,7 @@ dependencies = [ "checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" "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_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" +"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" @@ -2742,72 +2805,73 @@ dependencies = [ "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 rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)" = "d32b3053e5ced86e4bc0411fec997389532bf56b000e66cb4884eeeb41413d69" +"checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "559008764a17de49a3146b234641644ed37d118d1ef641a0bb573d146edc6ce0" +"checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" "checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" -"checksum reqwest 0.9.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3c4ef83e0beb14bfe38b9f01330a5bc8e965a9f9628690aa28383746dac1e925" +"checksum reqwest 0.9.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddcfd2c13c6af0f9c45a1086be3b9c68af79e4430b42790759e2d34cce2a6c60" "checksum rmp 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a3d45d7afc9b132b34a2479648863aa95c5c88e98b32285326a6ebadc80ec5c9" "checksum rmp-serde 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)" = "011e1d58446e9fa3af7cdc1fb91295b10621d3ac4cb3a85cc86385ee9ca50cd3" -"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" +"checksum rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ccc78bfd5acd7bf3e89cffcf899e5cb1a52d6fafa8dec2739ad70c9577a57288" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" +"checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" "checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2f84d114ef17fd144153d608fba7c446b0145d038985e7a8cc5d08bb0ce20383" "checksum scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1aa96c45e7f5a91cb7fabe7b279f02fea7126239fc40b732316e8b6a2d0fcb" -"checksum security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfab8dda0e7a327c696d893df9ffa19cadc4bd195797997f5223cf5831beaf05" -"checksum security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d6696852716b589dff9e886ff83778bb635150168e83afa8ac6b8a78cb82abc" +"checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" +"checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" "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.90 (registry+https://github.com/rust-lang/crates.io-index)" = "aa5f7c20820475babd2c077c3ab5f8c77a31c15e16ea38687b4c02d3e48680f4" +"checksum serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "a72e9b96fa45ce22a4bc23da3858dfccfd60acd28a25bcd328a98fdd6bea43fd" "checksum serde-bench 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d733da87e79faaac25616e33d26299a41143fd4cd42746cbb0e91d8feea243fd" "checksum serde_bytes 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)" = "defbb8a83d7f34cc8380751eeb892b825944222888aff18996ea7901f24aec88" -"checksum serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "58fc82bec244f168b23d1963b45c8bf5726e9a15a9d146a067f9081aeed2de79" +"checksum serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "101b495b109a3e3ca8c4cbe44cf62391527cdfb6ba15821c5ce80bcd5ea23f9f" "checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" -"checksum serde_test 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce17ed207fa61e7f4701a778a6c111da84a441ca9a8f50b92808f4223dd240b" -"checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" +"checksum serde_test 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "164b351e29d8a2230b77c27e47dda5603be39a2d35db38f440f0b78946ce37c7" +"checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" -"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" +"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3d0760c312538987d363c36c42339b55f5ee176ea8808bbe4543d484a291c8d1" "checksum structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "528aeb7351d042e6ffbc2a6fb76a86f9b622fdf7c25932798e7a82cb03bc94c6" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)" = "66c8865bf5a7cbb662d8b011950060b3c8743dca141b054bf7195b20d314d8e2" +"checksum syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)" = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" -"checksum tar 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)" = "c2167ff53da2a661702b3299f71a91b61b1dffef36b4b2884b1f9c67254c0133" +"checksum tar 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)" = "7201214ded95b34e3bc00c9557b6dcec34fd1af428d343143f5db67c661762f0" "checksum target-lexicon 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6923974ce4eb5bd28814756256d8ab71c28dd6e7483313fe7ab6614306bf633" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b86c784c88d98c801132806dadd3819ed29d8600836c4088e855cdf3e178ed8a" "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 textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" +"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" +"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7655088894274afb52b807bd3c87072daa1fedd155068b8705cabfd628956115" -"checksum tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "65641e515a437b308ab131a82ce3042ff9795bef5d6c5a9be4eb24195c417fd9" +"checksum tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cec6c34409089be085de9403ba2010b80e36938c9ca992c4f67f407bb13db0b1" "checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" "checksum tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "83ea44c6c0773cc034771693711c35c677b4b5a4b21b9e7071704c54de7d555e" "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" "checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" -"checksum tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fda385df506bf7546e70872767f71e81640f1f251bdf2fd8eb81a0eaec5fe022" +"checksum tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "5b2f843ffdf8d6e1f90bddd48da43f99ab071660cd92b7ec560ef3cdfd7a409a" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ec5759cf26cf9659555f36c431b515e3d05f66831741c85b4b5d5dfb9cf1323c" +"checksum tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72558af20be886ea124595ea0f806dd5703b8958e4705429dd58b3d8231f72f2" "checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" "checksum tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350c9edade9830dc185ae48ba45667a445ab59f6167ef6d0254ec9d2430d9dd3" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" +"checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41d17211f887da8e4a70a45b9536f26fc5de166b81e2d5d80de4a17fd22553bd" +"checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" @@ -2837,7 +2901,7 @@ dependencies = [ "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" "checksum zbox 0.6.1 (git+https://github.com/wasmerio/zbox?branch=bundle-libsodium)" = "" -"checksum zip 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1cbbddef6339155bc4fa8e2609040078ff18f3011117b55caa9f0516d544a357" -"checksum zstd 0.4.22+zstd.1.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6f042dd18d52854d302d3d92f66d0a63c2d520d7b7034a9d43cde7441d1b4ddd" -"checksum zstd-safe 1.4.7+zstd.1.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "63febf0b0dcd076db81e6b3110ed254cfb8ed54378a4c3cfbb68956e839d4f59" -"checksum zstd-sys 1.4.8+zstd.1.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4cb187d624025a7d9878ecf13437491869423426183ded2fa40d4651b85f7ae7" +"checksum zip 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c18fc320faf909036e46ac785ea827f72e485304877faf1a3a39538d3714dbc3" +"checksum zstd 0.4.24+zstd.1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5a6414958b49ee80f2dd0042023ac8f37cfe1d31fbeec0b9749cf6f2c03683" +"checksum zstd-safe 1.4.9+zstd.1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d98332212af687878b146a6549c188e9b72971972d23089c831472f938e6272" +"checksum zstd-sys 1.4.10+zstd.1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46f433134fbd0c37c9eb5929733df5f34bcdff464722eb93155fcee93eb57652" diff --git a/Cargo.toml b/Cargo.toml index 5de0f17ee41..408ccfa376c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ include = [ ] [dependencies] +byteorder = "1.3.1" errno = "0.2.4" structopt = "0.2.11" wabt = "0.7.2" @@ -32,9 +33,10 @@ wasmer-runtime-core = { path = "lib/runtime-core" } wasmer-emscripten = { path = "lib/emscripten" } wasmer-llvm-backend = { path = "lib/llvm-backend", optional = true } wasmer-wasi = { path = "lib/wasi", optional = true } +wasmer-kernel-loader = { path = "lib/kernel-loader", optional = true } [workspace] -members = ["lib/clif-backend", "lib/singlepass-backend", "lib/runtime", "lib/runtime-abi", "lib/runtime-core", "lib/emscripten", "lib/spectests", "lib/win-exception-handler", "lib/runtime-c-api", "lib/llvm-backend", "lib/wasi", "lib/middleware-common", "examples/plugin-for-example"] +members = ["lib/clif-backend", "lib/singlepass-backend", "lib/runtime", "lib/runtime-abi", "lib/runtime-core", "lib/emscripten", "lib/spectests", "lib/win-exception-handler", "lib/runtime-c-api", "lib/llvm-backend", "lib/wasi", "lib/middleware-common", "lib/kernel-loader", "lib/kernel-net", "examples/plugin-for-example"] [build-dependencies] wabt = "0.7.2" @@ -43,6 +45,7 @@ rustc_version = "0.2.3" [features] default = ["fast-tests", "wasi"] +"loader:kernel" = ["wasmer-kernel-loader"] debug = ["wasmer-runtime-core/debug"] extra-debug = ["wasmer-clif-backend/debug", "wasmer-runtime-core/debug"] # This feature will allow cargo test to run much faster diff --git a/Makefile b/Makefile index 06e66e7356c..d598e422016 100644 --- a/Makefile +++ b/Makefile @@ -67,13 +67,13 @@ test-emscripten-singlepass: cargo test --manifest-path lib/emscripten/Cargo.toml --features singlepass -- --test-threads=1 $(runargs) singlepass-debug-release: - cargo +nightly build --features "backend:singlepass debug" --release + cargo +nightly build --features backend:singlepass,debug --release singlepass-release: - cargo +nightly build --features "backend:singlepass" --release + cargo +nightly build --features backend:singlepass --release singlepass-build: - cargo +nightly build --features "backend:singlepass debug" + cargo +nightly build --features backend:singlepass,debug release: # If you are in OS-X, you will need mingw-w64 for cross compiling to windows @@ -81,13 +81,13 @@ release: cargo build --release production-release: - cargo build --release --features backend:singlepass,backend:llvm + cargo build --release --features backend:singlepass,backend:llvm,loader:kernel debug-release: - cargo build --release --features "debug" + cargo build --release --features debug extra-debug-release: - cargo build --release --features "extra-debug" + cargo build --release --features extra-debug publish-release: ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./artifacts/ diff --git a/examples/echo-server/Cargo.lock b/examples/echo-server/Cargo.lock new file mode 100644 index 00000000000..87e71d056e3 --- /dev/null +++ b/examples/echo-server/Cargo.lock @@ -0,0 +1,13 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "echo-server" +version = "0.1.0" +dependencies = [ + "kernel-net 0.1.0", +] + +[[package]] +name = "kernel-net" +version = "0.1.0" + diff --git a/examples/echo-server/Cargo.toml b/examples/echo-server/Cargo.toml new file mode 100644 index 00000000000..68643e4cd70 --- /dev/null +++ b/examples/echo-server/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "echo-server" +version = "0.1.0" +authors = ["Heyang Zhou "] +edition = "2018" + +[workspace] + +[dependencies] +kernel-net = { path = "../../lib/kernel-net" } \ No newline at end of file diff --git a/examples/echo-server/src/main.rs b/examples/echo-server/src/main.rs new file mode 100644 index 00000000000..93bacc09a1d --- /dev/null +++ b/examples/echo-server/src/main.rs @@ -0,0 +1,49 @@ +#![feature(wasi_ext)] + +use kernel_net::{schedule, Epoll, Tcp4Listener, TcpStream}; +use std::sync::Arc; + +fn do_echo(stream: Arc, buf: Vec) { + let stream2 = stream.clone(); + stream.read_async(buf, move |result| match result { + Ok(buf) => { + if buf.len() == 0 { + return; + } + let stream = stream2.clone(); + stream2.write_all_async(buf, move |result| match result { + Ok(buf) => { + schedule(|| { + do_echo(stream, buf); + }); + } + Err(code) => { + println!("failed to write; code = {}", code); + } + }); + } + Err(code) => { + println!("failed to read; code = {}", code); + } + }); +} + +fn main() { + let epoll = Arc::new(Epoll::new()); + let listener = Arc::new(Tcp4Listener::new("0.0.0.0", 2001, 128).unwrap()); + + listener.accept_async(epoll.clone(), |stream| match stream { + Ok(stream) => { + do_echo(stream, Vec::with_capacity(16384)); + Ok(()) + } + Err(code) => { + println!("failed to accept; code = {}", code); + Err(()) + } + }); + println!("start epoll"); + unsafe { + epoll.run(); + } +} diff --git a/examples/http-server/Cargo.lock b/examples/http-server/Cargo.lock new file mode 100644 index 00000000000..4b927b8e98d --- /dev/null +++ b/examples/http-server/Cargo.lock @@ -0,0 +1,13 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "http-server" +version = "0.1.0" +dependencies = [ + "kernel-net 0.1.0", +] + +[[package]] +name = "kernel-net" +version = "0.1.0" + diff --git a/examples/http-server/Cargo.toml b/examples/http-server/Cargo.toml new file mode 100644 index 00000000000..f394f7f5d66 --- /dev/null +++ b/examples/http-server/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "http-server" +version = "0.1.0" +authors = ["Heyang Zhou "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[workspace] + +[dependencies] +kernel-net = { path = "../../lib/kernel-net" } diff --git a/examples/http-server/src/main.rs b/examples/http-server/src/main.rs new file mode 100644 index 00000000000..12ba4615126 --- /dev/null +++ b/examples/http-server/src/main.rs @@ -0,0 +1,72 @@ +#![feature(wasi_ext)] + +use kernel_net::{schedule, Epoll, Tcp4Listener, TcpStream}; +use std::sync::Arc; + +fn serve(stream: Arc, mut all: Vec) { + let stream2 = stream.clone(); + stream.read_async( + Vec::with_capacity(512), + move |result| { + match result { + Ok(buf) => { + if buf.len() == 0 { + return; + } + all.extend_from_slice(&buf); + if all.len() > 4096 { + println!("header too large"); + return; + } + let s = match ::std::str::from_utf8(&all) { + Ok(x) => x, + Err(e) => { + println!("not utf8: {:?}", e); + return; + } + }; + if let Some(_pos) = s.find("\r\n\r\n") { + let body = format!( + "Hello, world!\n", + ).into_bytes(); + let stream = stream2.clone(); + stream2.write_all_async( + format!( + "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nConnection: close\r\nContent-Length: {}\r\n\r\n", + body.len() + ).into_bytes(), + |_| { + stream.write_all_async(body, |_| {}); + } + ); + } else { + schedule(|| serve(stream2, all)); + } + } + Err(code) => { + println!("failed to read; code = {}", code); + } + } + } + ); +} + +fn main() { + let epoll = Arc::new(Epoll::new()); + let listener = Arc::new(Tcp4Listener::new("0.0.0.0", 2011, 128).unwrap()); + + listener.accept_async(epoll.clone(), |stream| match stream { + Ok(stream) => { + serve(stream, vec![]); + Ok(()) + } + Err(code) => { + println!("failed to accept; code = {}", code); + Err(()) + } + }); + println!("start epoll"); + unsafe { + epoll.run(); + } +} diff --git a/examples/pipe/Cargo.toml b/examples/pipe/Cargo.toml new file mode 100644 index 00000000000..3dec721486a --- /dev/null +++ b/examples/pipe/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "pipe" +version = "0.1.0" +authors = ["Heyang Zhou "] +edition = "2018" + +[workspace] + +[dependencies] diff --git a/examples/pipe/src/main.rs b/examples/pipe/src/main.rs new file mode 100644 index 00000000000..5192c539ae3 --- /dev/null +++ b/examples/pipe/src/main.rs @@ -0,0 +1,13 @@ +use std::io::{Read, Write}; + +fn main() { + let mut stdin = ::std::io::stdin(); + let mut stdout = ::std::io::stdout(); + let mut buf: Vec = vec![0; 512]; + let mut total: u64 = 0; + while total < 1048576u64 * 2048 { + let n = stdin.read(&mut buf).unwrap(); + stdout.write_all(&buf[..n]).unwrap(); + total += n as u64; + } +} diff --git a/lib/kernel-loader/Cargo.toml b/lib/kernel-loader/Cargo.toml new file mode 100644 index 00000000000..921e71f9ab7 --- /dev/null +++ b/lib/kernel-loader/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "wasmer-kernel-loader" +version = "0.1.0" +authors = ["Heyang Zhou "] +edition = "2018" + +[dependencies] +libc = "0.2.49" +wasmer-runtime-core = { path = "../runtime-core" } diff --git a/lib/kernel-loader/src/lib.rs b/lib/kernel-loader/src/lib.rs new file mode 100644 index 00000000000..8abc850af33 --- /dev/null +++ b/lib/kernel-loader/src/lib.rs @@ -0,0 +1,168 @@ +pub mod service; + +use service::{ImportInfo, LoadProfile, RunProfile, ServiceContext, TableEntryRequest}; +use wasmer_runtime_core::{ + backend::RunnableModule, + loader::{Instance, Loader}, + module::ModuleInfo, + structures::TypedIndex, + types::{ + FuncIndex, ImportedMemoryIndex, ImportedTableIndex, LocalMemoryIndex, LocalTableIndex, + Value, + }, + vm::{Anyfunc, Ctx, LocalGlobal, SigId}, +}; + +pub struct KernelLoader; + +impl Loader for KernelLoader { + type Instance = KernelInstance; + type Error = String; + + fn load( + &self, + rm: &dyn RunnableModule, + module: &ModuleInfo, + full_ctx: &Ctx, + ) -> Result { + let ctx = &full_ctx.internal; + let code = rm.get_code().unwrap(); + let memory = if let Some(_) = module.memories.get(LocalMemoryIndex::new(0)) { + Some(unsafe { + ::std::slice::from_raw_parts((**ctx.memories).base, (**ctx.memories).bound) + }) + } else if let Some(_) = module.imported_memories.get(ImportedMemoryIndex::new(0)) { + return Err("imported memory is not supported".into()); + } else { + None + }; + let table: Option> = + if let Some(_) = module.tables.get(LocalTableIndex::new(0)) { + Some(unsafe { + let table = &**ctx.tables; + let elements: &[Anyfunc]; + #[allow(clippy::cast_ptr_alignment)] + { + elements = + ::std::slice::from_raw_parts(table.base as *const Anyfunc, table.count); + } + + let base_addr = code.as_ptr() as usize; + let end_addr = base_addr + code.len(); + elements + .iter() + .map(|x| { + let func_addr = x.func as usize; + TableEntryRequest { + offset: if x.func.is_null() + || func_addr < base_addr + || func_addr >= end_addr + { + ::std::usize::MAX + } else { + x.func as usize - base_addr + }, + sig_id: x.sig_id.0, + } + }) + .collect() + }) + } else if let Some(_) = module.imported_tables.get(ImportedTableIndex::new(0)) { + return Err("imported table is not supported".into()); + } else { + None + }; + if module.imported_globals.len() > 0 { + return Err("imported globals are not supported".into()); + } + let globals: Vec = unsafe { + let globals: &[*mut LocalGlobal] = + ::std::slice::from_raw_parts(ctx.globals, module.globals.len()); + globals.iter().map(|x| (**x).data).collect() + }; + let mut import_names: Vec = vec![]; + for (idx, import) in &module.imported_functions { + let name = format!( + "{}##{}", + module.namespace_table.get(import.namespace_index), + module.name_table.get(import.name_index) + ); + let sig = module + .signatures + .get(*module.func_assoc.get(FuncIndex::new(idx.index())).unwrap()) + .unwrap(); + import_names.push(ImportInfo { + name: name, + param_count: sig.params().len(), + }); + } + let dynamic_sigindices: &[u32] = unsafe { + ::std::mem::transmute::<&[SigId], &[u32]>(::std::slice::from_raw_parts( + ctx.dynamic_sigindices, + full_ctx.dynamic_sigindice_count(), + )) + }; + let param_counts: Vec = (0..module.func_assoc.len()) + .map(|x| { + module + .signatures + .get(*module.func_assoc.get(FuncIndex::new(x)).unwrap()) + .unwrap() + .params() + .len() + }) + .collect(); + let profile = LoadProfile { + code: code, + memory: memory, + memory_max: 0, + globals: &globals, + imports: &import_names, + dynamic_sigindices: dynamic_sigindices, + table: table.as_ref().map(|x| x.as_slice()), + }; + let sc = ServiceContext::new(profile).map_err(|x| format!("{:?}", x))?; + Ok(KernelInstance { + context: sc, + offsets: rm.get_offsets().unwrap(), + param_counts: param_counts, + }) + } +} + +pub struct KernelInstance { + context: ServiceContext, + offsets: Vec, + param_counts: Vec, // FIXME: Full signature check +} + +impl Instance for KernelInstance { + type Error = String; + fn call(&mut self, id: usize, args: &[Value]) -> Result { + if args.len() != self.param_counts[id] { + return Err("param count mismatch".into()); + } + let args: Vec = args.iter().map(|x| x.to_u64()).collect(); + + let ret = self + .context + .run_code(RunProfile { + entry_offset: self.offsets[id] as u32, + params: &args, + }) + .map_err(|x| format!("{:?}", x))?; + Ok(ret) + } + + fn read_memory(&mut self, offset: u32, len: u32) -> Result, String> { + self.context + .read_memory(offset, len) + .map_err(|x| format!("{:?}", x)) + } + + fn write_memory(&mut self, offset: u32, len: u32, buf: &[u8]) -> Result<(), String> { + self.context + .write_memory(offset, len, buf) + .map_err(|x| format!("{:?}", x)) + } +} diff --git a/lib/kernel-loader/src/service.rs b/lib/kernel-loader/src/service.rs new file mode 100644 index 00000000000..45ccdd869be --- /dev/null +++ b/lib/kernel-loader/src/service.rs @@ -0,0 +1,255 @@ +use std::error::Error; +use std::fs::File; +use std::io; +use std::os::unix::io::AsRawFd; + +macro_rules! impl_debug_display { + ($target:ident) => { + impl ::std::fmt::Display for $target { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + ::fmt(self, f) + } + } + }; +} + +#[repr(i32)] +pub enum Command { + LoadCode = 0x1001, + RunCode = 0x1002, + ReadMemory = 0x1003, + WriteMemory = 0x1004, +} + +#[derive(Debug)] +pub enum ServiceError { + Io(io::Error), + Code(i32), + InvalidInput, + Rejected, +} + +pub type ServiceResult = Result; + +impl_debug_display!(ServiceError); + +impl Error for ServiceError { + fn description(&self) -> &str { + "ServiceError" + } +} + +impl From for ServiceError { + fn from(other: io::Error) -> ServiceError { + ServiceError::Io(other) + } +} + +#[repr(C)] +struct LoadCodeRequest { + code: *const u8, + code_len: u32, + memory: *const u8, + memory_len: u32, + memory_max: u32, + table: *const TableEntryRequest, + table_count: u32, + globals: *const u64, + global_count: u32, + + imported_funcs: *const ImportRequest, + imported_func_count: u32, + + dynamic_sigindices: *const u32, + dynamic_sigindice_count: u32, +} + +#[repr(C)] +struct RunCodeRequest { + entry_offset: u32, + params: *const u64, + param_count: u32, + result: *mut RunCodeResult, +} + +#[repr(C)] +struct RunCodeResult { + success: u32, + retval: u64, +} + +#[repr(C)] +struct ReadMemoryRequest { + out: *mut u8, + offset: u32, + len: u32, +} + +#[repr(C)] +struct WriteMemoryRequest { + _in: *const u8, + offset: u32, + len: u32, +} + +#[repr(C)] +struct ImportRequest { + name: [u8; 64], + param_count: u32, +} + +#[repr(C)] +pub struct TableEntryRequest { + pub offset: usize, + pub sig_id: u32, +} + +pub struct LoadProfile<'a> { + pub code: &'a [u8], + pub memory: Option<&'a [u8]>, + pub memory_max: usize, + pub globals: &'a [u64], + pub imports: &'a [ImportInfo], + pub dynamic_sigindices: &'a [u32], + pub table: Option<&'a [TableEntryRequest]>, +} + +pub struct ImportInfo { + pub name: String, + pub param_count: usize, +} + +pub struct RunProfile<'a> { + pub entry_offset: u32, + pub params: &'a [u64], +} + +pub struct ServiceContext { + dev: File, +} + +impl ServiceContext { + pub fn new(load: LoadProfile) -> ServiceResult { + let dev = File::open("/dev/wasmctl")?; + let imports: Vec = load + .imports + .iter() + .map(|x| { + let mut req = ImportRequest { + name: [0u8; 64], + param_count: x.param_count as u32, + }; + let name = x.name.as_bytes(); + let mut count = req.name.len() - 1; + if name.len() < count { + count = name.len(); + } + req.name[..count].copy_from_slice(&name[..count]); + req + }) + .collect(); + let req = LoadCodeRequest { + code: load.code.as_ptr(), + code_len: load.code.len() as u32, + memory: load + .memory + .map(|x| x.as_ptr()) + .unwrap_or(::std::ptr::null()), + memory_len: load.memory.map(|x| x.len() as u32).unwrap_or(0), + memory_max: load.memory_max as u32, + table: load.table.map(|x| x.as_ptr()).unwrap_or(::std::ptr::null()), + table_count: load.table.map(|x| x.len() as u32).unwrap_or(0), + globals: load.globals.as_ptr(), + global_count: load.globals.len() as u32, + imported_funcs: imports.as_ptr(), + imported_func_count: imports.len() as u32, + dynamic_sigindices: load.dynamic_sigindices.as_ptr(), + dynamic_sigindice_count: load.dynamic_sigindices.len() as u32, + }; + let fd = dev.as_raw_fd(); + let ret = unsafe { + ::libc::ioctl( + fd, + Command::LoadCode as i32 as ::libc::c_ulong, + &req as *const _ as ::libc::c_ulong, + ) + }; + if ret != 0 { + Err(ServiceError::Code(ret)) + } else { + Ok(ServiceContext { dev: dev }) + } + } + + pub fn run_code(&mut self, run: RunProfile) -> ServiceResult { + let mut result: RunCodeResult = unsafe { ::std::mem::zeroed() }; + let mut req = RunCodeRequest { + entry_offset: run.entry_offset, + params: run.params.as_ptr(), + param_count: run.params.len() as u32, + result: &mut result, + }; + let fd = self.dev.as_raw_fd(); + let err = unsafe { + ::libc::ioctl( + fd, + Command::RunCode as i32 as ::libc::c_ulong, + &mut req as *mut _ as ::libc::c_ulong, + ) + }; + if err < 0 { + Err(ServiceError::Code(err)) + } else if result.success == 0 { + println!("Rejected {} {}", result.success, result.retval); + Err(ServiceError::Rejected) + } else { + Ok(result.retval) + } + } + + pub fn read_memory(&mut self, offset: u32, len: u32) -> ServiceResult> { + let fd = self.dev.as_raw_fd(); + let mut ret = Vec::with_capacity(len as usize); + unsafe { + ret.set_len(len as usize); + } + let req = ReadMemoryRequest { + out: ret.as_mut_ptr(), + offset: offset, + len: len, + }; + let err = unsafe { + ::libc::ioctl( + fd, + Command::ReadMemory as i32 as ::libc::c_ulong, + &req as *const _ as ::libc::c_ulong, + ) + }; + if err < 0 { + Err(ServiceError::Code(err)) + } else { + Ok(ret) + } + } + + pub fn write_memory(&mut self, offset: u32, len: u32, buf: &[u8]) -> ServiceResult<()> { + let fd = self.dev.as_raw_fd(); + let req = WriteMemoryRequest { + _in: buf.as_ptr(), + offset: offset, + len: len, + }; + let err = unsafe { + ::libc::ioctl( + fd, + Command::WriteMemory as i32 as ::libc::c_ulong, + &req as *const _ as ::libc::c_ulong, + ) + }; + if err < 0 { + Err(ServiceError::Code(err)) + } else { + Ok(()) + } + } +} diff --git a/lib/kernel-net/Cargo.toml b/lib/kernel-net/Cargo.toml new file mode 100644 index 00000000000..28db6bf4d4f --- /dev/null +++ b/lib/kernel-net/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "kernel-net" +version = "0.1.0" +authors = ["Heyang Zhou "] +edition = "2018" + +[dependencies] +#runtime = "0.3.0-alpha.4" +#runtime-raw = "0.3.0-alpha.3" diff --git a/lib/kernel-net/src/lib.rs b/lib/kernel-net/src/lib.rs new file mode 100644 index 00000000000..98746a68f95 --- /dev/null +++ b/lib/kernel-net/src/lib.rs @@ -0,0 +1,466 @@ +#![cfg(all(target_arch = "wasm32", target_os = "wasi"))] +#![feature(wasi_ext)] + +use std::cell::RefCell; +use std::fs::File; +use std::net::{AddrParseError, Ipv4Addr}; +use std::os::wasi::io::FromRawFd; +use std::sync::{Arc, Mutex}; + +const AF_INET: i32 = 2; +const SOCK_STREAM: i32 = 1; +const O_NONBLOCK: u32 = 2048; +const F_GETFL: i32 = 3; +const F_SETFL: i32 = 4; +const EPOLLIN: u32 = 1u32; +const EPOLLOUT: u32 = 4u32; +const EPOLLONESHOT: u32 = 1u32 << 30; +const EPOLLET: u32 = 1u32 << 31; +const EAGAIN: i32 = 11; +const EWOULDBLOCK: i32 = EAGAIN; +const EPOLL_CTL_ADD: i32 = 1; +const EPOLL_CTL_DEL: i32 = 2; + +#[link(wasm_import_module = "net")] +extern "C" { + fn _socket(family: i32, _type: i32, proto: i32) -> i32; + fn _bind(fd: i32, sa: *const SockaddrIn, sa_len: usize) -> i32; + fn _listen(fd: i32, backlog: i32) -> i32; + fn _accept4(fd: i32, sa: *mut SockaddrIn, sa_len: *mut usize, flags: u32) -> i32; + fn _sendto( + fd: i32, + buf: *const u8, + buf_len: usize, + flags: u32, + addr: *const SockaddrIn, + addr_len: usize, + ) -> i32; + fn _recvfrom( + fd: i32, + buf: *mut u8, + buf_len: usize, + flags: u32, + addr: *mut SockaddrIn, + addr_len: *mut usize, + ) -> i32; + fn _eventfd_sem(initial: u32) -> i32; + fn _epoll_create() -> i32; + fn _epoll_ctl(epfd: i32, op: i32, fd: i32, event: *const EpollEvent) -> i32; + fn _epoll_wait(epfd: i32, events: *mut EpollEvent, maxevents: usize, timeout: i32) -> i32; + fn _fcntl(fd: i32, cmd: i32, arg: u32) -> i32; +} + +thread_local! { + static GLOBAL_EPOLL: RefCell>> = RefCell::new(None); + static ASYNC_STATE_POOL: RefCell>> = RefCell::new(Vec::new()); +} + +#[derive(Default)] +struct AsyncState { + callback: Option>, + _epoll: Option>, +} + +pub struct Epoll { + fd: i32, + imm_queue: Mutex>>, +} + +impl Epoll { + pub fn new() -> Epoll { + let fd = unsafe { _epoll_create() }; + assert!(fd >= 0); + Epoll { + fd: fd, + imm_queue: Mutex::new(Vec::new()), + } + } + + pub fn schedule(&self, f: F) { + self.imm_queue.lock().unwrap().push(Box::new(f)); + } + + pub unsafe fn run(self: Arc) -> ! { + GLOBAL_EPOLL.with(|x| { + *x.borrow_mut() = Some(self.clone()); + }); + let mut events: Vec = vec![EpollEvent::default(); 32]; + loop { + loop { + let imm_queue = + ::std::mem::replace(&mut *self.imm_queue.lock().unwrap(), Vec::new()); + if imm_queue.len() == 0 { + break; + } + for f in imm_queue { + f(); + } + } + let events_len = events.len(); + let n_ready = _epoll_wait(self.fd, events.as_mut_ptr(), events_len, -1); + assert!(n_ready >= 0); + /*if n_ready > 1 { + println!("n_ready = {}", n_ready); + }*/ + for ev in &events[..n_ready as usize] { + if ev.events & (EPOLLIN | EPOLLOUT) != 0 { + //println!("Free event {:x} {:?}", ev.events, ev.data as usize as *mut AsyncState); + let mut state = Box::from_raw(ev.data as usize as *mut AsyncState); + (state.callback.take().unwrap())(); + put_async_state(state); + //println!("After callback"); + } else { + println!("unknown event(s): 0x{:x}", ev.events); + } + } + } + } +} + +impl Drop for Epoll { + fn drop(&mut self) { + unsafe { + File::from_raw_fd(self.fd as _); + } + } +} + +#[derive(Copy, Clone, Debug)] +pub enum EpollDirection { + In, + Out, +} + +fn get_async_state() -> Box { + ASYNC_STATE_POOL.with(|pool| { + pool.borrow_mut() + .pop() + .unwrap_or_else(|| Box::new(AsyncState::default())) + }) +} + +fn put_async_state(mut x: Box) { + x.callback = None; + x._epoll = None; + ASYNC_STATE_POOL.with(|pool| pool.borrow_mut().push(x)); +} + +pub fn schedule(f: F) { + //println!("schedule"); + let epoll = GLOBAL_EPOLL.with(|x| x.borrow().as_ref().unwrap().clone()); + epoll.schedule(f); +} + +fn get_async_io_payload< + T: 'static, + P: FnMut(i32) -> Result + 'static, + F: FnOnce(Result) + 'static, +>( + epoll: Arc, + fd: i32, + direction: EpollDirection, + poll_action: P, + on_ready: F, +) -> Box { + __get_async_io_payload(epoll, fd, direction, poll_action, on_ready, false) +} + +fn __get_async_io_payload< + T: 'static, + P: FnMut(i32) -> Result + 'static, + F: FnOnce(Result) + 'static, +>( + epoll: Arc, + fd: i32, + direction: EpollDirection, + mut poll_action: P, + on_ready: F, + registered: bool, +) -> Box { + let epfd = epoll.fd; + Box::new(move || { + //println!("async io payload"); + let ret = poll_action(fd); + //println!("async io payload (after poll_action)"); + match ret { + Err(x) if x == -EAGAIN || x == -EWOULDBLOCK => { + let mut state = get_async_state(); + state.callback = Some(__get_async_io_payload( + epoll.clone(), + fd, + direction, + poll_action, + on_ready, + true, + )); + state._epoll = Some(epoll); + let direction_flag = match direction { + EpollDirection::In => EPOLLIN, + EpollDirection::Out => EPOLLOUT, + }; + let ev = EpollEvent { + events: direction_flag | EPOLLET | EPOLLONESHOT, + data: Box::into_raw(state) as usize as _, + }; + //println!("Alloc event {:?}", ev.data as usize as *mut AsyncState); + let ret = unsafe { _epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &ev) }; + assert!(ret >= 0); + } + x => { + if registered { + assert!( + unsafe { _epoll_ctl(epfd, EPOLL_CTL_DEL, fd, ::std::ptr::null(),) } >= 0 + ); + } + on_ready(x); // fast path + } + } + }) +} + +#[repr(C)] +#[derive(Copy, Clone)] +struct SockaddrIn { + sin_family: u16, // e.g. AF_INET + sin_port: u16, // e.g. htons(3490) + sin_addr: InAddr, + sin_zero: [u8; 8], +} + +#[repr(C)] +#[derive(Copy, Clone)] +struct InAddr { + s_addr: u32, +} + +#[repr(C, packed)] +#[derive(Copy, Clone, Default)] +struct EpollEvent { + events: u32, + data: u64, +} + +fn invert_byteorder_u16(x: u16) -> u16 { + unsafe { + use std::mem::transmute; + let buf: [u8; 2] = transmute(x); + let out: [u8; 2] = [buf[1], buf[0]]; + transmute(out) + } +} + +#[derive(Debug)] +pub enum SocketError { + AddrParse(AddrParseError), + SocketCreate, + Bind, + Listen, + Accept, + Message(String), +} + +pub struct Tcp4Listener { + _addr: Ipv4Addr, + _port: u16, + fd: i32, +} + +impl Tcp4Listener { + pub fn new>( + addr: A, + port: u16, + backlog: u32, + ) -> Result { + let addr: Ipv4Addr = addr.as_ref().parse().map_err(SocketError::AddrParse)?; + let sa = SockaddrIn { + sin_family: AF_INET as _, + sin_port: invert_byteorder_u16(port), + sin_addr: InAddr { + s_addr: unsafe { ::std::mem::transmute(addr.octets()) }, + }, + sin_zero: [0; 8], + }; + let fd = unsafe { _socket(AF_INET, SOCK_STREAM, 0) }; + if fd < 0 { + return Err(SocketError::SocketCreate); + } + if unsafe { _bind(fd, &sa, ::std::mem::size_of::()) } < 0 { + return Err(SocketError::Bind); + } + if unsafe { _listen(fd, backlog as _) } < 0 { + return Err(SocketError::Listen); + } + + unsafe { + let mut socket_flags = _fcntl(fd, F_GETFL, 0) as u32; + socket_flags |= O_NONBLOCK; + assert!(_fcntl(fd, F_SETFL, socket_flags) >= 0); + } + + Ok(Tcp4Listener { + _addr: addr, + _port: port, + fd: fd, + }) + } + + pub fn accept_async, i32>) -> Result<(), ()> + 'static>( + self: Arc, + ep: Arc, + cb: F, + ) { + let ep2 = ep.clone(); + (get_async_io_payload( + ep.clone(), + self.fd, + EpollDirection::In, + move |fd| -> Result, i32> { + let mut incoming_sa: SockaddrIn = unsafe { ::std::mem::uninitialized() }; + let mut real_len: usize = ::std::mem::size_of::(); + let conn = unsafe { _accept4(fd, &mut incoming_sa, &mut real_len, O_NONBLOCK) }; + if conn >= 0 { + unsafe { + let mut socket_flags = _fcntl(conn, F_GETFL, 0) as u32; + socket_flags |= O_NONBLOCK; + assert!(_fcntl(conn, F_SETFL, socket_flags) >= 0); + } + Ok(Arc::new(TcpStream { + fd: conn, + epoll: ep.clone(), + })) + } else { + Err(conn) + } + }, + move |x| { + schedule(|| { + if let Ok(()) = cb(x) { + self.accept_async(ep2, cb); + } + }); + }, + ))(); + } +} + +pub struct TcpStream { + fd: i32, + epoll: Arc, +} + +impl TcpStream { + pub fn __write_async( + self: Arc, + data: Vec, + offset: usize, + cb: impl FnOnce(Result<(usize, Vec), i32>) + 'static, + ) { + let mut data = Some(data); + + (get_async_io_payload( + self.epoll.clone(), + self.fd, + EpollDirection::Out, + move |fd| -> Result<(usize, Vec), i32> { + let _data = data.as_ref().unwrap(); + let _data = &_data[offset..]; + let ret = + unsafe { _sendto(fd, _data.as_ptr(), _data.len(), 0, ::std::ptr::null(), 0) }; + if ret >= 0 { + Ok((ret as usize, data.take().unwrap())) + } else { + Err(ret) + } + }, + move |x| { + drop(self); + cb(x); + }, + ))(); + } + + pub fn write_async( + self: Arc, + data: Vec, + cb: impl FnOnce(Result<(usize, Vec), i32>) + 'static, + ) { + self.__write_async(data, 0, cb) + } + + pub fn write_all_async( + self: Arc, + data: Vec, + cb: impl FnOnce(Result, i32>) + 'static, + ) { + fn inner( + me: Arc, + data: Vec, + offset: usize, + cb: impl FnOnce(Result, i32>) + 'static, + ) { + let me2 = me.clone(); + me.__write_async(data, offset, move |result| match result { + Ok((len, data)) => { + let new_offset = offset + len; + if new_offset == data.len() { + cb(Ok(data)); + } else { + inner(me2, data, new_offset, cb); + } + } + Err(code) => { + cb(Err(code)); + } + }) + } + inner(self, data, 0, cb); + } + + pub fn read_async( + self: Arc, + out: Vec, + cb: impl FnOnce(Result, i32>) + 'static, + ) { + let mut out = Some(out); + (get_async_io_payload( + self.epoll.clone(), + self.fd, + EpollDirection::In, + move |fd| -> Result, i32> { + let _out = out.as_mut().unwrap(); + let out_cap = _out.capacity(); + let ret = unsafe { + _recvfrom( + fd, + _out.as_mut_ptr(), + out_cap, + 0, + ::std::ptr::null_mut(), + ::std::ptr::null_mut(), + ) + }; + if ret >= 0 { + assert!(ret as usize <= out_cap); + unsafe { + _out.set_len(ret as usize); + } + Ok(out.take().unwrap()) + } else { + Err(ret) + } + }, + move |x| { + drop(self); + cb(x); + }, + ))(); + } +} + +impl Drop for TcpStream { + fn drop(&mut self) { + unsafe { + File::from_raw_fd(self.fd as _); + } + } +} diff --git a/lib/llvm-backend/src/code.rs b/lib/llvm-backend/src/code.rs index 028207a8c4f..8514208ad54 100644 --- a/lib/llvm-backend/src/code.rs +++ b/lib/llvm-backend/src/code.rs @@ -285,13 +285,16 @@ fn resolve_memory_ptr( ctx: &mut CtxType, memarg: &MemoryImmediate, ptr_ty: PointerType, + value_size: usize, ) -> Result { // Ignore alignment hint for the time being. let imm_offset = intrinsics.i64_ty.const_int(memarg.offset as u64, false); + let value_size_v = intrinsics.i64_ty.const_int(value_size as u64, false); let var_offset_i32 = state.pop1()?.into_int_value(); let var_offset = builder.build_int_z_extend(var_offset_i32, intrinsics.i64_ty, &state.var_name()); let effective_offset = builder.build_int_add(var_offset, imm_offset, &state.var_name()); + let end_offset = builder.build_int_add(effective_offset, value_size_v, &state.var_name()); let memory_cache = ctx.memory(MemoryIndex::new(0), intrinsics); let mem_base_int = match memory_cache { @@ -306,12 +309,20 @@ fn resolve_memory_ptr( let base_as_int = builder.build_ptr_to_int(base, intrinsics.i64_ty, "base_as_int"); - let base_in_bounds = builder.build_int_compare( + let base_in_bounds_1 = builder.build_int_compare( + IntPredicate::ULE, + end_offset, + bounds, + "base_in_bounds_1", + ); + let base_in_bounds_2 = builder.build_int_compare( IntPredicate::ULT, effective_offset, - bounds, - "base_in_bounds", + end_offset, + "base_in_bounds_2", ); + let base_in_bounds = + builder.build_and(base_in_bounds_1, base_in_bounds_2, "base_in_bounds"); let base_in_bounds = builder .build_call( @@ -2000,6 +2011,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i32_ptr_ty, + 4, )?; let result = builder.build_load(effective_address, &state.var_name()); state.push1(result); @@ -2014,6 +2026,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i64_ptr_ty, + 8, )?; let result = builder.build_load(effective_address, &state.var_name()); state.push1(result); @@ -2028,6 +2041,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.f32_ptr_ty, + 4, )?; let result = builder.build_load(effective_address, &state.var_name()); state.push1(result); @@ -2042,6 +2056,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.f64_ptr_ty, + 8, )?; let result = builder.build_load(effective_address, &state.var_name()); state.push1(result); @@ -2058,6 +2073,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i32_ptr_ty, + 4, )?; builder.build_store(effective_address, value); } @@ -2072,6 +2088,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i64_ptr_ty, + 8, )?; builder.build_store(effective_address, value); } @@ -2086,6 +2103,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.f32_ptr_ty, + 4, )?; builder.build_store(effective_address, value); } @@ -2100,6 +2118,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.f64_ptr_ty, + 8, )?; builder.build_store(effective_address, value); } @@ -2114,6 +2133,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i8_ptr_ty, + 1, )?; let narrow_result = builder .build_load(effective_address, &state.var_name()) @@ -2132,6 +2152,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i16_ptr_ty, + 2, )?; let narrow_result = builder .build_load(effective_address, &state.var_name()) @@ -2150,6 +2171,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i8_ptr_ty, + 1, )?; let narrow_result = builder .build_load(effective_address, &state.var_name()) @@ -2168,6 +2190,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i16_ptr_ty, + 2, )?; let narrow_result = builder .build_load(effective_address, &state.var_name()) @@ -2186,6 +2209,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i32_ptr_ty, + 4, )?; let narrow_result = builder .build_load(effective_address, &state.var_name()) @@ -2205,6 +2229,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i8_ptr_ty, + 1, )?; let narrow_result = builder .build_load(effective_address, &state.var_name()) @@ -2223,6 +2248,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i16_ptr_ty, + 2, )?; let narrow_result = builder .build_load(effective_address, &state.var_name()) @@ -2241,6 +2267,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i8_ptr_ty, + 1, )?; let narrow_result = builder .build_load(effective_address, &state.var_name()) @@ -2259,6 +2286,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i16_ptr_ty, + 2, )?; let narrow_result = builder .build_load(effective_address, &state.var_name()) @@ -2277,6 +2305,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i32_ptr_ty, + 4, )?; let narrow_result = builder .build_load(effective_address, &state.var_name()) @@ -2297,6 +2326,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i8_ptr_ty, + 1, )?; let narrow_value = builder.build_int_truncate(value, intrinsics.i8_ty, &state.var_name()); @@ -2313,6 +2343,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i16_ptr_ty, + 2, )?; let narrow_value = builder.build_int_truncate(value, intrinsics.i16_ty, &state.var_name()); @@ -2329,6 +2360,7 @@ impl FunctionCodeGenerator for LLVMFunctionCodeGenerator { &mut ctx, memarg, intrinsics.i32_ptr_ty, + 4, )?; let narrow_value = builder.build_int_truncate(value, intrinsics.i32_ty, &state.var_name()); diff --git a/lib/llvm-backend/src/intrinsics.rs b/lib/llvm-backend/src/intrinsics.rs index 6250fd4fd44..ebee5a3882d 100644 --- a/lib/llvm-backend/src/intrinsics.rs +++ b/lib/llvm-backend/src/intrinsics.rs @@ -16,6 +16,7 @@ use wasmer_runtime_core::{ GlobalIndex, ImportedFuncIndex, LocalFuncIndex, LocalOrImport, MemoryIndex, SigIndex, TableIndex, Type, }, + vm::Ctx, }; fn type_to_llvm_ptr(intrinsics: &Intrinsics, ty: Type) -> PointerType { @@ -158,6 +159,10 @@ impl Intrinsics { let imported_func_ty = context.struct_type(&[i8_ptr_ty_basic, ctx_ptr_ty.as_basic_type_enum()], false); let sigindex_ty = i32_ty; + let rt_intrinsics_ty = void_ty; + let stack_lower_bound_ty = i8_ty; + let memory_base_ty = i8_ty; + let memory_bound_ty = void_ty; let local_function_ty = i8_ptr_ty; let anyfunc_ty = context.struct_type( @@ -201,6 +206,18 @@ impl Intrinsics { sigindex_ty .ptr_type(AddressSpace::Generic) .as_basic_type_enum(), + rt_intrinsics_ty + .ptr_type(AddressSpace::Generic) + .as_basic_type_enum(), + stack_lower_bound_ty + .ptr_type(AddressSpace::Generic) + .as_basic_type_enum(), + memory_base_ty + .ptr_type(AddressSpace::Generic) + .as_basic_type_enum(), + memory_bound_ty + .ptr_type(AddressSpace::Generic) + .as_basic_type_enum(), local_function_ty .ptr_type(AddressSpace::Generic) .as_basic_type_enum(), @@ -416,6 +433,10 @@ pub struct CtxType<'a> { _phantom: PhantomData<&'a FunctionValue>, } +fn offset_to_index(offset: u8) -> u32 { + (offset as usize / ::std::mem::size_of::()) as u32 +} + impl<'a> CtxType<'a> { pub fn new( info: &'a ModuleInfo, @@ -454,14 +475,22 @@ impl<'a> CtxType<'a> { let (memory_array_ptr_ptr, index, memory_type) = match index.local_or_import(info) { LocalOrImport::Local(local_mem_index) => ( unsafe { - cache_builder.build_struct_gep(ctx_ptr_value, 0, "memory_array_ptr_ptr") + cache_builder.build_struct_gep( + ctx_ptr_value, + offset_to_index(Ctx::offset_memories()), + "memory_array_ptr_ptr", + ) }, local_mem_index.index() as u64, info.memories[local_mem_index].memory_type(), ), LocalOrImport::Import(import_mem_index) => ( unsafe { - cache_builder.build_struct_gep(ctx_ptr_value, 3, "memory_array_ptr_ptr") + cache_builder.build_struct_gep( + ctx_ptr_value, + offset_to_index(Ctx::offset_imported_memories()), + "memory_array_ptr_ptr", + ) }, import_mem_index.index() as u64, info.imported_memories[import_mem_index].1.memory_type(), @@ -527,13 +556,21 @@ impl<'a> CtxType<'a> { let (table_array_ptr_ptr, index) = match index.local_or_import(info) { LocalOrImport::Local(local_table_index) => ( unsafe { - cache_builder.build_struct_gep(ctx_ptr_value, 1, "table_array_ptr_ptr") + cache_builder.build_struct_gep( + ctx_ptr_value, + offset_to_index(Ctx::offset_tables()), + "table_array_ptr_ptr", + ) }, local_table_index.index() as u64, ), LocalOrImport::Import(import_table_index) => ( unsafe { - cache_builder.build_struct_gep(ctx_ptr_value, 4, "table_array_ptr_ptr") + cache_builder.build_struct_gep( + ctx_ptr_value, + offset_to_index(Ctx::offset_imported_tables()), + "table_array_ptr_ptr", + ) }, import_table_index.index() as u64, ), @@ -578,8 +615,13 @@ impl<'a> CtxType<'a> { intrinsics: &Intrinsics, builder: &Builder, ) -> PointerValue { - let local_func_array_ptr_ptr = - unsafe { builder.build_struct_gep(self.ctx_ptr_value, 8, "local_func_array_ptr_ptr") }; + let local_func_array_ptr_ptr = unsafe { + builder.build_struct_gep( + self.ctx_ptr_value, + offset_to_index(Ctx::offset_local_functions()), + "local_func_array_ptr_ptr", + ) + }; let local_func_array_ptr = builder .build_load(local_func_array_ptr_ptr, "local_func_array_ptr") .into_pointer_value(); @@ -609,7 +651,11 @@ impl<'a> CtxType<'a> { *cached_sigindices.entry(index).or_insert_with(|| { let sigindex_array_ptr_ptr = unsafe { - cache_builder.build_struct_gep(ctx_ptr_value, 7, "sigindex_array_ptr_ptr") + cache_builder.build_struct_gep( + ctx_ptr_value, + offset_to_index(Ctx::offset_signatures()), + "sigindex_array_ptr_ptr", + ) }; let sigindex_array_ptr = cache_builder .build_load(sigindex_array_ptr_ptr, "sigindex_array_ptr") @@ -647,7 +693,7 @@ impl<'a> CtxType<'a> { unsafe { cache_builder.build_struct_gep( ctx_ptr_value, - 2, + offset_to_index(Ctx::offset_globals()), "globals_array_ptr_ptr", ) }, @@ -662,7 +708,7 @@ impl<'a> CtxType<'a> { unsafe { cache_builder.build_struct_gep( ctx_ptr_value, - 5, + offset_to_index(Ctx::offset_imported_globals()), "globals_array_ptr_ptr", ) }, @@ -718,7 +764,11 @@ impl<'a> CtxType<'a> { let imported_func_cache = cached_imported_functions.entry(index).or_insert_with(|| { let func_array_ptr_ptr = unsafe { - cache_builder.build_struct_gep(ctx_ptr_value, 6, "imported_func_array_ptr_ptr") + cache_builder.build_struct_gep( + ctx_ptr_value, + offset_to_index(Ctx::offset_imported_funcs()), + "imported_func_array_ptr_ptr", + ) }; let func_array_ptr = cache_builder .build_load(func_array_ptr_ptr, "func_array_ptr") diff --git a/lib/runtime-core/src/backend.rs b/lib/runtime-core/src/backend.rs index d465cda5834..1d493c31475 100644 --- a/lib/runtime-core/src/backend.rs +++ b/lib/runtime-core/src/backend.rs @@ -39,16 +39,26 @@ impl Token { } } +#[derive(Copy, Clone, Debug)] +pub enum MemoryBoundCheckMode { + Default, + Enable, + Disable, +} + +impl Default for MemoryBoundCheckMode { + fn default() -> MemoryBoundCheckMode { + MemoryBoundCheckMode::Default + } +} + /// Configuration data for the compiler +#[derive(Default)] pub struct CompilerConfig { /// Symbol information generated from emscripten; used for more detailed debug messages pub symbol_map: Option>, -} - -impl Default for CompilerConfig { - fn default() -> CompilerConfig { - CompilerConfig { symbol_map: None } - } + pub memory_bound_check_mode: MemoryBoundCheckMode, + pub enforce_stack_check: bool, } pub trait Compiler { @@ -80,6 +90,16 @@ pub trait RunnableModule: Send + Sync { fn get_trampoline(&self, info: &ModuleInfo, sig_index: SigIndex) -> Option; unsafe fn do_early_trap(&self, data: Box) -> !; + + /// Returns the machine code associated with this module. + fn get_code(&self) -> Option<&[u8]> { + None + } + + /// Returns the beginning offsets of all functions, including import trampolines. + fn get_offsets(&self) -> Option> { + None + } } pub trait CacheGen: Send + Sync { diff --git a/lib/runtime-core/src/backing.rs b/lib/runtime-core/src/backing.rs index b3d529460ef..821ff379f4d 100644 --- a/lib/runtime-core/src/backing.rs +++ b/lib/runtime-core/src/backing.rs @@ -456,10 +456,17 @@ fn import_functions( }); } None => { - link_errors.push(LinkError::ImportNotFound { - namespace: namespace.to_string(), - name: name.to_string(), - }); + if imports.allow_missing_functions { + functions.push(vm::ImportedFunc { + func: ::std::ptr::null(), + vmctx: ::std::ptr::null_mut(), + }); + } else { + link_errors.push(LinkError::ImportNotFound { + namespace: namespace.to_string(), + name: name.to_string(), + }); + } } } } diff --git a/lib/runtime-core/src/codegen.rs b/lib/runtime-core/src/codegen.rs index b61ce58bb88..1d9f30f1a4e 100644 --- a/lib/runtime-core/src/codegen.rs +++ b/lib/runtime-core/src/codegen.rs @@ -42,21 +42,29 @@ impl fmt::Debug for InternalEvent { pub struct BkptInfo {} pub trait ModuleCodeGenerator, RM: RunnableModule, E: Debug> { + /// Creates a new module code generator. fn new() -> Self; + + /// Returns the backend id associated with this MCG. fn backend_id() -> Backend; - fn check_precondition(&mut self, module_info: &ModuleInfo) -> Result<(), E>; - /// Creates a new function and returns the function-scope code generator for it. - fn next_function(&mut self) -> Result<&mut FCG, E>; - fn finalize(self, module_info: &ModuleInfo) -> Result<(RM, Box), E>; + /// Feeds the compiler config. + fn feed_compiler_config(&mut self, _config: &CompilerConfig) -> Result<(), E> { + Ok(()) + } + /// Adds an import function. + fn feed_import_function(&mut self) -> Result<(), E>; fn feed_signatures(&mut self, signatures: Map) -> Result<(), E>; - /// Sets function signatures. fn feed_function_signatures(&mut self, assoc: Map) -> Result<(), E>; + /// Checks the precondition for a module. + fn check_precondition(&mut self, module_info: &ModuleInfo) -> Result<(), E>; + /// Creates a new function and returns the function-scope code generator for it. + fn next_function(&mut self) -> Result<&mut FCG, E>; + /// Finalizes this module. + fn finalize(self, module_info: &ModuleInfo) -> Result<(RM, Box), E>; - /// Adds an import function. - fn feed_import_function(&mut self) -> Result<(), E>; - + /// Creates a module from cache. unsafe fn from_cache(cache: Artifact, _: Token) -> Result; } diff --git a/lib/runtime-core/src/import.rs b/lib/runtime-core/src/import.rs index 14465deedd3..9522b0829fa 100644 --- a/lib/runtime-core/src/import.rs +++ b/lib/runtime-core/src/import.rs @@ -47,6 +47,7 @@ impl IsExport for Export { pub struct ImportObject { map: Rc>>>, state_creator: Option (*mut c_void, fn(*mut c_void))>>, + pub allow_missing_functions: bool, } impl ImportObject { @@ -55,6 +56,7 @@ impl ImportObject { Self { map: Rc::new(RefCell::new(HashMap::new())), state_creator: None, + allow_missing_functions: false, } } @@ -65,6 +67,7 @@ impl ImportObject { Self { map: Rc::new(RefCell::new(HashMap::new())), state_creator: Some(Rc::new(state_creator)), + allow_missing_functions: false, } } @@ -116,6 +119,7 @@ impl ImportObject { Self { map: Rc::clone(&self.map), state_creator: self.state_creator.clone(), + allow_missing_functions: false, } } diff --git a/lib/runtime-core/src/instance.rs b/lib/runtime-core/src/instance.rs index d5f84acc2b3..69a8884c3af 100644 --- a/lib/runtime-core/src/instance.rs +++ b/lib/runtime-core/src/instance.rs @@ -5,9 +5,11 @@ use crate::{ export::{Context, Export, ExportIter, FuncPointer}, global::Global, import::{ImportObject, LikeNamespace}, + loader::Loader, memory::Memory, module::{ExportIndex, Module, ModuleInfo, ModuleInner}, sig_registry::SigRegistry, + structures::TypedIndex, table::Table, typed_func::{Func, Wasm, WasmTrapInfo, WasmTypeList}, types::{FuncIndex, FuncSig, GlobalIndex, LocalOrImport, MemoryIndex, TableIndex, Type, Value}, @@ -38,7 +40,7 @@ impl Drop for InstanceInner { /// /// [`ImportObject`]: struct.ImportObject.html pub struct Instance { - module: Arc, + pub module: Arc, inner: Box, #[allow(dead_code)] import_object: ImportObject, @@ -127,6 +129,12 @@ impl Instance { Ok(instance) } + pub fn load(&self, loader: T) -> ::std::result::Result { + loader.load(&*self.module.runnable_module, &self.module.info, unsafe { + &*self.inner.vmctx + }) + } + /// Through generic magic and the awe-inspiring power of traits, we bring you... /// /// # "Func" @@ -214,6 +222,26 @@ impl Instance { } } + pub fn resolve_func(&self, name: &str) -> ResolveResult { + let export_index = + self.module + .info + .exports + .get(name) + .ok_or_else(|| ResolveError::ExportNotFound { + name: name.to_string(), + })?; + + if let ExportIndex::Func(func_index) = export_index { + Ok(func_index.index()) + } else { + Err(ResolveError::ExportWrongType { + name: name.to_string(), + } + .into()) + } + } + /// This returns the representation of a function that can be called /// safely. /// diff --git a/lib/runtime-core/src/lib.rs b/lib/runtime-core/src/lib.rs index da9144a2b10..20708c17a5e 100644 --- a/lib/runtime-core/src/lib.rs +++ b/lib/runtime-core/src/lib.rs @@ -21,6 +21,7 @@ pub mod export; pub mod global; pub mod import; pub mod instance; +pub mod loader; pub mod memory; pub mod module; pub mod parse; diff --git a/lib/runtime-core/src/loader.rs b/lib/runtime-core/src/loader.rs new file mode 100644 index 00000000000..5ef127ec728 --- /dev/null +++ b/lib/runtime-core/src/loader.rs @@ -0,0 +1,169 @@ +use crate::{backend::RunnableModule, module::ModuleInfo, types::Value, vm::Ctx}; +#[cfg(unix)] +use libc::{mmap, mprotect, munmap, MAP_ANON, MAP_PRIVATE, PROT_EXEC, PROT_READ, PROT_WRITE}; +use std::{ + fmt::Debug, + ops::{Deref, DerefMut}, +}; + +pub trait Loader { + type Instance: Instance; + type Error: Debug; + + fn load( + &self, + rm: &dyn RunnableModule, + module: &ModuleInfo, + ctx: &Ctx, + ) -> Result; +} + +pub trait Instance { + type Error: Debug; + fn call(&mut self, id: usize, args: &[Value]) -> Result; + fn read_memory(&mut self, _offset: u32, _len: u32) -> Result, Self::Error> { + unimplemented!() + } + + fn write_memory(&mut self, _offset: u32, _len: u32, _buf: &[u8]) -> Result<(), Self::Error> { + unimplemented!() + } +} + +pub struct LocalLoader; + +impl Loader for LocalLoader { + type Instance = LocalInstance; + type Error = String; + + fn load( + &self, + rm: &dyn RunnableModule, + _module: &ModuleInfo, + _ctx: &Ctx, + ) -> Result { + let code = rm.get_code().unwrap(); + let mut code_mem = CodeMemory::new(code.len()); + code_mem[..code.len()].copy_from_slice(code); + code_mem.make_executable(); + + Ok(LocalInstance { + code: code_mem, + offsets: rm.get_offsets().unwrap(), + }) + } +} + +pub struct LocalInstance { + code: CodeMemory, + offsets: Vec, +} + +impl Instance for LocalInstance { + type Error = String; + fn call(&mut self, id: usize, args: &[Value]) -> Result { + let offset = self.offsets[id]; + let addr: *const u8 = unsafe { self.code.as_ptr().offset(offset as isize) }; + use std::mem::transmute; + Ok(unsafe { + match args.len() { + 0 => (transmute::<_, extern "C" fn() -> u64>(addr))(), + 1 => (transmute::<_, extern "C" fn(u64) -> u64>(addr))(args[0].to_u64()), + 2 => (transmute::<_, extern "C" fn(u64, u64) -> u64>(addr))( + args[0].to_u64(), + args[1].to_u64(), + ), + 3 => (transmute::<_, extern "C" fn(u64, u64, u64) -> u64>(addr))( + args[0].to_u64(), + args[1].to_u64(), + args[2].to_u64(), + ), + 4 => (transmute::<_, extern "C" fn(u64, u64, u64, u64) -> u64>(addr))( + args[0].to_u64(), + args[1].to_u64(), + args[2].to_u64(), + args[3].to_u64(), + ), + 5 => (transmute::<_, extern "C" fn(u64, u64, u64, u64, u64) -> u64>(addr))( + args[0].to_u64(), + args[1].to_u64(), + args[2].to_u64(), + args[3].to_u64(), + args[4].to_u64(), + ), + _ => return Err("too many arguments".into()), + } + }) + } +} + +pub struct CodeMemory { + ptr: *mut u8, + size: usize, +} + +#[cfg(not(unix))] +impl CodeMemory { + pub fn new(_size: usize) -> CodeMemory { + unimplemented!(); + } + + pub fn make_executable(&mut self) { + unimplemented!(); + } +} + +#[cfg(unix)] +impl CodeMemory { + pub fn new(size: usize) -> CodeMemory { + fn round_up_to_page_size(size: usize) -> usize { + (size + (4096 - 1)) & !(4096 - 1) + } + let size = round_up_to_page_size(size); + let ptr = unsafe { + mmap( + ::std::ptr::null_mut(), + size, + PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANON, + -1, + 0, + ) + }; + if ptr as isize == -1 { + panic!("cannot allocate code memory"); + } + CodeMemory { + ptr: ptr as _, + size: size, + } + } + + pub fn make_executable(&mut self) { + if unsafe { mprotect(self.ptr as _, self.size, PROT_READ | PROT_EXEC) } != 0 { + panic!("cannot set code memory to executable"); + } + } +} + +#[cfg(unix)] +impl Drop for CodeMemory { + fn drop(&mut self) { + unsafe { + munmap(self.ptr as _, self.size); + } + } +} + +impl Deref for CodeMemory { + type Target = [u8]; + fn deref(&self) -> &[u8] { + unsafe { ::std::slice::from_raw_parts(self.ptr, self.size) } + } +} + +impl DerefMut for CodeMemory { + fn deref_mut(&mut self) -> &mut [u8] { + unsafe { ::std::slice::from_raw_parts_mut(self.ptr, self.size) } + } +} diff --git a/lib/runtime-core/src/parse.rs b/lib/runtime-core/src/parse.rs index e7e80fc2971..7fdbd095ac9 100644 --- a/lib/runtime-core/src/parse.rs +++ b/lib/runtime-core/src/parse.rs @@ -53,6 +53,8 @@ pub fn read_module< middlewares: &mut MiddlewareChain, compiler_config: &CompilerConfig, ) -> Result { + mcg.feed_compiler_config(compiler_config) + .map_err(|x| LoadError::Codegen(format!("{:?}", x)))?; let mut info = ModuleInfo { memories: Map::new(), globals: Map::new(), diff --git a/lib/runtime-core/src/types.rs b/lib/runtime-core/src/types.rs index 975b5cfba36..0c8f08d1a8c 100644 --- a/lib/runtime-core/src/types.rs +++ b/lib/runtime-core/src/types.rs @@ -45,6 +45,15 @@ impl Value { Value::F64(_) => Type::F64, } } + + pub fn to_u64(&self) -> u64 { + match *self { + Value::I32(x) => x as u32 as u64, + Value::I64(x) => x as u64, + Value::F32(x) => f32::to_bits(x) as u64, + Value::F64(x) => f64::to_bits(x), + } + } } impl From for Value { diff --git a/lib/runtime-core/src/vm.rs b/lib/runtime-core/src/vm.rs index 6649b6a5919..323e40c219b 100644 --- a/lib/runtime-core/src/vm.rs +++ b/lib/runtime-core/src/vm.rs @@ -1,9 +1,10 @@ pub use crate::backing::{ImportBacking, LocalBacking}; use crate::{ - memory::Memory, - module::ModuleInner, + memory::{Memory, MemoryType}, + module::{ModuleInfo, ModuleInner}, structures::TypedIndex, types::{LocalOrImport, MemoryIndex}, + vmcalls, }; use std::{ffi::c_void, mem, ptr}; @@ -25,7 +26,7 @@ use hashbrown::HashMap; #[repr(C)] pub struct Ctx { // `internal` must be the first field of `Ctx`. - pub(crate) internal: InternalCtx, + pub internal: InternalCtx, pub(crate) local_functions: *const *const Func, @@ -84,6 +85,83 @@ pub struct InternalCtx { /// signature id. This is used to allow call-indirect to other /// modules safely. pub dynamic_sigindices: *const SigId, + + pub intrinsics: *const Intrinsics, + + pub stack_lower_bound: *mut u8, + + pub memory_base: *mut u8, + pub memory_bound: usize, +} + +#[repr(C)] +pub struct Intrinsics { + pub memory_grow: *const Func, + pub memory_size: *const Func, + /*pub memory_grow: unsafe extern "C" fn( + ctx: &mut Ctx, + memory_index: usize, + delta: Pages, + ) -> i32, + pub memory_size: unsafe extern "C" fn( + ctx: &Ctx, + memory_index: usize, + ) -> Pages,*/ +} + +unsafe impl Send for Intrinsics {} +unsafe impl Sync for Intrinsics {} + +impl Intrinsics { + #[allow(clippy::erasing_op)] + pub fn offset_memory_grow() -> u8 { + (0 * ::std::mem::size_of::()) as u8 + } + pub fn offset_memory_size() -> u8 { + (1 * ::std::mem::size_of::()) as u8 + } +} + +pub static INTRINSICS_LOCAL_STATIC_MEMORY: Intrinsics = Intrinsics { + memory_grow: vmcalls::local_static_memory_grow as _, + memory_size: vmcalls::local_static_memory_size as _, +}; +pub static INTRINSICS_LOCAL_DYNAMIC_MEMORY: Intrinsics = Intrinsics { + memory_grow: vmcalls::local_dynamic_memory_grow as _, + memory_size: vmcalls::local_dynamic_memory_size as _, +}; +pub static INTRINSICS_IMPORTED_STATIC_MEMORY: Intrinsics = Intrinsics { + memory_grow: vmcalls::imported_static_memory_grow as _, + memory_size: vmcalls::imported_static_memory_size as _, +}; +pub static INTRINSICS_IMPORTED_DYNAMIC_MEMORY: Intrinsics = Intrinsics { + memory_grow: vmcalls::imported_dynamic_memory_grow as _, + memory_size: vmcalls::imported_dynamic_memory_size as _, +}; + +fn get_intrinsics_for_module(m: &ModuleInfo) -> *const Intrinsics { + if m.memories.len() == 0 && m.imported_memories.len() == 0 { + ::std::ptr::null() + } else { + match MemoryIndex::new(0).local_or_import(m) { + LocalOrImport::Local(local_mem_index) => { + let mem_desc = &m.memories[local_mem_index]; + match mem_desc.memory_type() { + MemoryType::Dynamic => &INTRINSICS_LOCAL_DYNAMIC_MEMORY, + MemoryType::Static => &INTRINSICS_LOCAL_STATIC_MEMORY, + MemoryType::SharedStatic => unimplemented!(), + } + } + LocalOrImport::Import(import_mem_index) => { + let mem_desc = &m.imported_memories[import_mem_index].1; + match mem_desc.memory_type() { + MemoryType::Dynamic => &INTRINSICS_IMPORTED_DYNAMIC_MEMORY, + MemoryType::Static => &INTRINSICS_IMPORTED_STATIC_MEMORY, + MemoryType::SharedStatic => unimplemented!(), + } + } + } + } } impl Ctx { @@ -93,6 +171,16 @@ impl Ctx { import_backing: &mut ImportBacking, module: &ModuleInner, ) -> Self { + let (mem_base, mem_bound): (*mut u8, usize) = + if module.info.memories.len() == 0 && module.info.imported_memories.len() == 0 { + (::std::ptr::null_mut(), 0) + } else { + let mem = match MemoryIndex::new(0).local_or_import(&module.info) { + LocalOrImport::Local(index) => local_backing.vm_memories[index], + LocalOrImport::Import(index) => import_backing.vm_memories[index], + }; + ((*mem).base, (*mem).bound) + }; Self { internal: InternalCtx { memories: local_backing.vm_memories.as_mut_ptr(), @@ -105,6 +193,13 @@ impl Ctx { imported_funcs: import_backing.vm_functions.as_mut_ptr(), dynamic_sigindices: local_backing.dynamic_sigindices.as_ptr(), + + intrinsics: get_intrinsics_for_module(&module.info), + + stack_lower_bound: ::std::ptr::null_mut(), + + memory_base: mem_base, + memory_bound: mem_bound, }, local_functions: local_backing.local_functions.as_ptr(), @@ -125,6 +220,16 @@ impl Ctx { data: *mut c_void, data_finalizer: fn(*mut c_void), ) -> Self { + let (mem_base, mem_bound): (*mut u8, usize) = + if module.info.memories.len() == 0 && module.info.imported_memories.len() == 0 { + (::std::ptr::null_mut(), 0) + } else { + let mem = match MemoryIndex::new(0).local_or_import(&module.info) { + LocalOrImport::Local(index) => local_backing.vm_memories[index], + LocalOrImport::Import(index) => import_backing.vm_memories[index], + }; + ((*mem).base, (*mem).bound) + }; Self { internal: InternalCtx { memories: local_backing.vm_memories.as_mut_ptr(), @@ -137,6 +242,13 @@ impl Ctx { imported_funcs: import_backing.vm_functions.as_mut_ptr(), dynamic_sigindices: local_backing.dynamic_sigindices.as_ptr(), + + intrinsics: get_intrinsics_for_module(&module.info), + + stack_lower_bound: ::std::ptr::null_mut(), + + memory_base: mem_base, + memory_bound: mem_bound, }, local_functions: local_backing.local_functions.as_ptr(), @@ -186,6 +298,11 @@ impl Ctx { pub unsafe fn borrow_symbol_map(&self) -> &Option> { &(*self.module).info.em_symbol_map } + + /// Returns the number of dynamic sigindices. + pub fn dynamic_sigindice_count(&self) -> usize { + unsafe { (*self.local_backing).dynamic_sigindices.len() } + } } #[doc(hidden)] @@ -223,9 +340,25 @@ impl Ctx { 7 * (mem::size_of::() as u8) } - pub fn offset_local_functions() -> u8 { + pub fn offset_intrinsics() -> u8 { 8 * (mem::size_of::() as u8) } + + pub fn offset_stack_lower_bound() -> u8 { + 9 * (mem::size_of::() as u8) + } + + pub fn offset_memory_base() -> u8 { + 10 * (mem::size_of::() as u8) + } + + pub fn offset_memory_bound() -> u8 { + 11 * (mem::size_of::() as u8) + } + + pub fn offset_local_functions() -> u8 { + 12 * (mem::size_of::() as u8) + } } enum InnerFunc {} @@ -419,6 +552,26 @@ mod vm_offset_tests { offset_of!(InternalCtx => imported_funcs).get_byte_offset(), ); + assert_eq!( + Ctx::offset_intrinsics() as usize, + offset_of!(InternalCtx => intrinsics).get_byte_offset(), + ); + + assert_eq!( + Ctx::offset_stack_lower_bound() as usize, + offset_of!(InternalCtx => stack_lower_bound).get_byte_offset(), + ); + + assert_eq!( + Ctx::offset_memory_base() as usize, + offset_of!(InternalCtx => memory_base).get_byte_offset(), + ); + + assert_eq!( + Ctx::offset_memory_bound() as usize, + offset_of!(InternalCtx => memory_bound).get_byte_offset(), + ); + assert_eq!( Ctx::offset_local_functions() as usize, offset_of!(Ctx => local_functions).get_byte_offset(), diff --git a/lib/runtime-core/src/vmcalls.rs b/lib/runtime-core/src/vmcalls.rs index 4126024bf83..5205a0d6901 100644 --- a/lib/runtime-core/src/vmcalls.rs +++ b/lib/runtime-core/src/vmcalls.rs @@ -20,10 +20,15 @@ pub unsafe extern "C" fn local_static_memory_grow( let local_memory = *ctx.internal.memories.add(memory_index.index()); let memory = (*local_memory).memory as *mut StaticMemory; - match (*memory).grow(delta, &mut *local_memory) { + let ret = match (*memory).grow(delta, &mut *local_memory) { Ok(old) => old.0 as i32, Err(_) => -1, - } + }; + + ctx.internal.memory_base = (*local_memory).base; + ctx.internal.memory_bound = (*local_memory).bound; + + ret } pub unsafe extern "C" fn local_static_memory_size( @@ -44,10 +49,15 @@ pub unsafe extern "C" fn local_dynamic_memory_grow( let local_memory = *ctx.internal.memories.add(memory_index.index()); let memory = (*local_memory).memory as *mut DynamicMemory; - match (*memory).grow(delta, &mut *local_memory) { + let ret = match (*memory).grow(delta, &mut *local_memory) { Ok(old) => old.0 as i32, Err(_) => -1, - } + }; + + ctx.internal.memory_base = (*local_memory).base; + ctx.internal.memory_bound = (*local_memory).bound; + + ret } pub unsafe extern "C" fn local_dynamic_memory_size( @@ -75,10 +85,15 @@ pub unsafe extern "C" fn imported_static_memory_grow( .add(import_memory_index.index()); let memory = (*local_memory).memory as *mut StaticMemory; - match (*memory).grow(delta, &mut *local_memory) { + let ret = match (*memory).grow(delta, &mut *local_memory) { Ok(old) => old.0 as i32, Err(_) => -1, - } + }; + + ctx.internal.memory_base = (*local_memory).base; + ctx.internal.memory_bound = (*local_memory).bound; + + ret } pub unsafe extern "C" fn imported_static_memory_size( @@ -102,10 +117,15 @@ pub unsafe extern "C" fn imported_dynamic_memory_grow( let local_memory = *ctx.internal.imported_memories.add(memory_index.index()); let memory = (*local_memory).memory as *mut DynamicMemory; - match (*memory).grow(delta, &mut *local_memory) { + let ret = match (*memory).grow(delta, &mut *local_memory) { Ok(old) => old.0 as i32, Err(_) => -1, - } + }; + + ctx.internal.memory_base = (*local_memory).base; + ctx.internal.memory_bound = (*local_memory).bound; + + ret } pub unsafe extern "C" fn imported_dynamic_memory_size( diff --git a/lib/singlepass-backend/Cargo.toml b/lib/singlepass-backend/Cargo.toml index 72ec5200a8e..201a4d879c9 100644 --- a/lib/singlepass-backend/Cargo.toml +++ b/lib/singlepass-backend/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" [dependencies] wasmer-runtime-core = { path = "../runtime-core", version = "0.4.1" } wasmparser = "0.29.2" -dynasm = "0.3.1" +dynasm = "0.3.2" dynasmrt = "0.3.1" lazy_static = "1.2.0" byteorder = "1" diff --git a/lib/singlepass-backend/src/codegen_x64.rs b/lib/singlepass-backend/src/codegen_x64.rs index 9aa6c9151e2..7d4d0de5cc1 100644 --- a/lib/singlepass-backend/src/codegen_x64.rs +++ b/lib/singlepass-backend/src/codegen_x64.rs @@ -10,7 +10,9 @@ use smallvec::SmallVec; use std::ptr::NonNull; use std::{any::Any, collections::HashMap, sync::Arc}; use wasmer_runtime_core::{ - backend::{sys::Memory, Backend, CacheGen, RunnableModule, Token}, + backend::{ + sys::Memory, Backend, CacheGen, CompilerConfig, MemoryBoundCheckMode, RunnableModule, Token, + }, cache::{Artifact, Error as CacheError}, codegen::*, memory::MemoryType, @@ -21,8 +23,7 @@ use wasmer_runtime_core::{ FuncIndex, FuncSig, GlobalIndex, LocalFuncIndex, LocalOrImport, MemoryIndex, SigIndex, TableIndex, Type, }, - vm::{self, LocalGlobal, LocalMemory, LocalTable}, - vmcalls, + vm::{self, LocalGlobal, LocalTable}, }; use wasmparser::{Operator, Type as WpType}; @@ -121,6 +122,8 @@ pub struct X64ModuleCodeGenerator { function_labels: Option)>>, assembler: Option, func_import_count: usize, + + config: Option>, } #[derive(Copy, Clone, Debug, Eq, PartialEq)] @@ -135,7 +138,6 @@ pub struct X64FunctionCode { assembler: Option, function_labels: Option)>>, - br_table_data: Option>>, breakpoints: Option>>, returns: SmallVec<[WpType; 1]>, locals: Vec, @@ -145,6 +147,8 @@ pub struct X64FunctionCode { control_stack: Vec, machine: Machine, unreachable_depth: usize, + + config: Arc, } enum FuncPtrInner {} @@ -160,8 +164,8 @@ pub struct X64ExecutionContext { #[allow(dead_code)] functions: Vec, function_pointers: Vec, + function_offsets: Vec, signatures: Arc>, - _br_table_data: Vec>, breakpoints: Arc>>, func_import_count: usize, } @@ -271,6 +275,14 @@ impl RunnableModule for X64ExecutionContext { protect_unix::TRAP_EARLY_DATA.with(|x| x.set(Some(data))); protect_unix::trigger_trap(); } + + fn get_code(&self) -> Option<&[u8]> { + Some(&self.code) + } + + fn get_offsets(&self) -> Option> { + Some(self.function_offsets.iter().map(|x| x.0).collect()) + } } #[derive(Debug)] @@ -278,6 +290,12 @@ pub struct CodegenError { pub message: &'static str, } +#[derive(Copy, Clone, Debug)] +struct CodegenConfig { + memory_bound_check_mode: MemoryBoundCheckMode, + enforce_stack_check: bool, +} + impl ModuleCodeGenerator for X64ModuleCodeGenerator { @@ -289,6 +307,7 @@ impl ModuleCodeGenerator function_labels: Some(HashMap::new()), assembler: Some(Assembler::new().unwrap()), func_import_count: 0, + config: None, } } @@ -301,21 +320,18 @@ impl ModuleCodeGenerator } fn next_function(&mut self) -> Result<&mut X64FunctionCode, CodegenError> { - let (mut assembler, mut function_labels, br_table_data, breakpoints) = - match self.functions.last_mut() { - Some(x) => ( - x.assembler.take().unwrap(), - x.function_labels.take().unwrap(), - x.br_table_data.take().unwrap(), - x.breakpoints.take().unwrap(), - ), - None => ( - self.assembler.take().unwrap(), - self.function_labels.take().unwrap(), - vec![], - HashMap::new(), - ), - }; + let (mut assembler, mut function_labels, breakpoints) = match self.functions.last_mut() { + Some(x) => ( + x.assembler.take().unwrap(), + x.function_labels.take().unwrap(), + x.breakpoints.take().unwrap(), + ), + None => ( + self.assembler.take().unwrap(), + self.function_labels.take().unwrap(), + HashMap::new(), + ), + }; let begin_offset = assembler.offset(); let begin_label_info = function_labels .entry(self.functions.len() + self.func_import_count) @@ -335,7 +351,6 @@ impl ModuleCodeGenerator assembler: Some(assembler), function_labels: Some(function_labels), - br_table_data: Some(br_table_data), breakpoints: Some(breakpoints), returns: smallvec![], locals: vec![], @@ -345,6 +360,7 @@ impl ModuleCodeGenerator control_stack: vec![], machine: Machine::new(), unreachable_depth: 0, + config: self.config.as_ref().unwrap().clone(), }; self.functions.push(code); Ok(self.functions.last_mut().unwrap()) @@ -354,12 +370,8 @@ impl ModuleCodeGenerator mut self, _: &ModuleInfo, ) -> Result<(X64ExecutionContext, Box), CodegenError> { - let (assembler, mut br_table_data, breakpoints) = match self.functions.last_mut() { - Some(x) => ( - x.assembler.take().unwrap(), - x.br_table_data.take().unwrap(), - x.breakpoints.take().unwrap(), - ), + let (assembler, breakpoints) = match self.functions.last_mut() { + Some(x) => (x.assembler.take().unwrap(), x.breakpoints.take().unwrap()), None => { return Err(CodegenError { message: "no function", @@ -368,18 +380,13 @@ impl ModuleCodeGenerator }; let output = assembler.finalize().unwrap(); - for table in &mut br_table_data { - for entry in table { - *entry = output.ptr(AssemblyOffset(*entry)) as usize; - } - } - let function_labels = if let Some(x) = self.functions.last() { x.function_labels.as_ref().unwrap() } else { self.function_labels.as_ref().unwrap() }; let mut out_labels: Vec = vec![]; + let mut out_offsets: Vec = vec![]; for i in 0..function_labels.len() { let (_, offset) = match function_labels.get(&i) { @@ -399,6 +406,7 @@ impl ModuleCodeGenerator } }; out_labels.push(FuncPtr(output.ptr(*offset) as _)); + out_offsets.push(*offset); } let breakpoints: Arc> = Arc::new( @@ -416,16 +424,15 @@ impl ModuleCodeGenerator )) } } - Ok(( X64ExecutionContext { code: output, functions: self.functions, signatures: self.signatures.as_ref().unwrap().clone(), - _br_table_data: br_table_data, breakpoints: breakpoints, func_import_count: self.func_import_count, function_pointers: out_labels, + function_offsets: out_offsets, }, Box::new(Placeholder), )) @@ -478,6 +485,13 @@ impl ModuleCodeGenerator Ok(()) } + fn feed_compiler_config(&mut self, config: &CompilerConfig) -> Result<(), CodegenError> { + self.config = Some(Arc::new(CodegenConfig { + memory_bound_check_mode: config.memory_bound_check_mode, + enforce_stack_check: config.enforce_stack_check, + })); + Ok(()) + } unsafe fn from_cache(_artifact: Artifact, _: Token) -> Result { Err(CacheError::Unknown( "the singlepass compiler API doesn't support caching yet".to_string(), @@ -1196,6 +1210,7 @@ impl X64FunctionCode { /// Emits a memory operation. fn emit_memory_op( module_info: &ModuleInfo, + config: &CodegenConfig, a: &mut Assembler, m: &mut Machine, addr: Location, @@ -1203,54 +1218,47 @@ impl X64FunctionCode { value_size: usize, cb: F, ) { + // If the memory is dynamic, we need to do bound checking at runtime. + let mem_desc = match MemoryIndex::new(0).local_or_import(module_info) { + LocalOrImport::Local(local_mem_index) => &module_info.memories[local_mem_index], + LocalOrImport::Import(import_mem_index) => { + &module_info.imported_memories[import_mem_index].1 + } + }; + let need_check = match config.memory_bound_check_mode { + MemoryBoundCheckMode::Default => match mem_desc.memory_type() { + MemoryType::Dynamic => true, + MemoryType::Static | MemoryType::SharedStatic => false, + }, + MemoryBoundCheckMode::Enable => true, + MemoryBoundCheckMode::Disable => false, + }; + let tmp_addr = m.acquire_temp_gpr().unwrap(); let tmp_base = m.acquire_temp_gpr().unwrap(); let tmp_bound = m.acquire_temp_gpr().unwrap(); - // Loads both base and bound into temporary registers. + // Load base into temporary register. a.emit_mov( Size::S64, Location::Memory( Machine::get_vmctx_reg(), - match MemoryIndex::new(0).local_or_import(module_info) { - LocalOrImport::Local(_) => vm::Ctx::offset_memories(), - LocalOrImport::Import(_) => vm::Ctx::offset_imported_memories(), - } as i32, + vm::Ctx::offset_memory_base() as i32, ), Location::GPR(tmp_base), ); - a.emit_mov( - Size::S64, - Location::Memory(tmp_base, 0), - Location::GPR(tmp_base), - ); - a.emit_mov( - Size::S32, - Location::Memory(tmp_base, LocalMemory::offset_bound() as i32), - Location::GPR(tmp_bound), - ); - a.emit_mov( - Size::S64, - Location::Memory(tmp_base, LocalMemory::offset_base() as i32), - Location::GPR(tmp_base), - ); - - // Adds base to bound so `tmp_bound` now holds the end of linear memory. - a.emit_add(Size::S64, Location::GPR(tmp_base), Location::GPR(tmp_bound)); - - // If the memory is dynamic, we need to do bound checking at runtime. - let mem_desc = match MemoryIndex::new(0).local_or_import(module_info) { - LocalOrImport::Local(local_mem_index) => &module_info.memories[local_mem_index], - LocalOrImport::Import(import_mem_index) => { - &module_info.imported_memories[import_mem_index].1 - } - }; - let need_check = match mem_desc.memory_type() { - MemoryType::Dynamic => true, - MemoryType::Static | MemoryType::SharedStatic => false, - }; if need_check { + a.emit_mov( + Size::S64, + Location::Memory( + Machine::get_vmctx_reg(), + vm::Ctx::offset_memory_bound() as i32, + ), + Location::GPR(tmp_bound), + ); + // Adds base to bound so `tmp_bound` now holds the end of linear memory. + a.emit_add(Size::S64, Location::GPR(tmp_base), Location::GPR(tmp_bound)); a.emit_mov(Size::S32, addr, Location::GPR(tmp_addr)); // This branch is used for emitting "faster" code for the special case of (offset + value_size) not exceeding u32 range. @@ -1414,6 +1422,19 @@ impl FunctionCodeGenerator for X64FunctionCode { a.emit_push(Size::S64, Location::GPR(GPR::RBP)); a.emit_mov(Size::S64, Location::GPR(GPR::RSP), Location::GPR(GPR::RBP)); + // Stack check. + if self.config.enforce_stack_check { + a.emit_cmp( + Size::S64, + Location::Memory( + GPR::RDI, // first parameter is vmctx + vm::Ctx::offset_stack_lower_bound() as i32, + ), + Location::GPR(GPR::RSP), + ); + a.emit_conditional_trap(Condition::Below); + } + self.locals = self .machine .init_locals(a, self.num_locals, self.num_params); @@ -3307,33 +3328,23 @@ impl FunctionCodeGenerator for X64FunctionCode { Operator::Nop => {} Operator::MemorySize { reserved } => { let memory_index = MemoryIndex::new(reserved as usize); - let target: usize = match memory_index.local_or_import(module_info) { - LocalOrImport::Local(local_mem_index) => { - let mem_desc = &module_info.memories[local_mem_index]; - match mem_desc.memory_type() { - MemoryType::Dynamic => vmcalls::local_dynamic_memory_size as usize, - MemoryType::Static => vmcalls::local_static_memory_size as usize, - MemoryType::SharedStatic => unimplemented!(), - } - } - LocalOrImport::Import(import_mem_index) => { - let mem_desc = &module_info.imported_memories[import_mem_index].1; - match mem_desc.memory_type() { - MemoryType::Dynamic => vmcalls::imported_dynamic_memory_size as usize, - MemoryType::Static => vmcalls::imported_static_memory_size as usize, - MemoryType::SharedStatic => unimplemented!(), - } - } - }; + a.emit_mov( + Size::S64, + Location::Memory( + Machine::get_vmctx_reg(), + vm::Ctx::offset_intrinsics() as i32, + ), + Location::GPR(GPR::RAX), + ); + a.emit_mov( + Size::S64, + Location::Memory(GPR::RAX, vm::Intrinsics::offset_memory_size() as i32), + Location::GPR(GPR::RAX), + ); Self::emit_call_sysv( a, &mut self.machine, |a| { - a.emit_mov( - Size::S64, - Location::Imm64(target as u64), - Location::GPR(GPR::RAX), - ); a.emit_call_location(Location::GPR(GPR::RAX)); }, ::std::iter::once(Location::Imm32(memory_index.index() as u32)), @@ -3344,40 +3355,30 @@ impl FunctionCodeGenerator for X64FunctionCode { } Operator::MemoryGrow { reserved } => { let memory_index = MemoryIndex::new(reserved as usize); - let target: usize = match memory_index.local_or_import(module_info) { - LocalOrImport::Local(local_mem_index) => { - let mem_desc = &module_info.memories[local_mem_index]; - match mem_desc.memory_type() { - MemoryType::Dynamic => vmcalls::local_dynamic_memory_grow as usize, - MemoryType::Static => vmcalls::local_static_memory_grow as usize, - MemoryType::SharedStatic => unimplemented!(), - } - } - LocalOrImport::Import(import_mem_index) => { - let mem_desc = &module_info.imported_memories[import_mem_index].1; - match mem_desc.memory_type() { - MemoryType::Dynamic => vmcalls::imported_dynamic_memory_grow as usize, - MemoryType::Static => vmcalls::imported_static_memory_grow as usize, - MemoryType::SharedStatic => unimplemented!(), - } - } - }; - let (param_pages, param_pages_lot) = self.value_stack.pop().unwrap(); if param_pages_lot == LocalOrTemp::Temp { self.machine.release_locations_only_regs(&[param_pages]); } + a.emit_mov( + Size::S64, + Location::Memory( + Machine::get_vmctx_reg(), + vm::Ctx::offset_intrinsics() as i32, + ), + Location::GPR(GPR::RAX), + ); + a.emit_mov( + Size::S64, + Location::Memory(GPR::RAX, vm::Intrinsics::offset_memory_grow() as i32), + Location::GPR(GPR::RAX), + ); + Self::emit_call_sysv( a, &mut self.machine, |a| { - a.emit_mov( - Size::S64, - Location::Imm64(target as u64), - Location::GPR(GPR::RAX), - ); a.emit_call_location(Location::GPR(GPR::RAX)); }, ::std::iter::once(Location::Imm32(memory_index.index() as u32)) @@ -3400,6 +3401,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3425,6 +3427,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3450,6 +3453,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3476,6 +3480,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3502,6 +3507,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3528,6 +3534,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3554,6 +3561,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target_addr, @@ -3579,6 +3587,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target_addr, @@ -3604,6 +3613,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target_addr, @@ -3629,6 +3639,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target_addr, @@ -3654,6 +3665,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3679,6 +3691,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3704,6 +3717,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3730,6 +3744,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3756,6 +3771,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3782,6 +3798,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3808,6 +3825,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3839,6 +3857,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target, @@ -3865,6 +3884,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target_addr, @@ -3890,6 +3910,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target_addr, @@ -3915,6 +3936,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target_addr, @@ -3940,6 +3962,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target_addr, @@ -3965,6 +3988,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_memory_op( module_info, + &self.config, a, &mut self.machine, target_addr, @@ -4061,7 +4085,8 @@ impl FunctionCodeGenerator for X64FunctionCode { let (targets, default_target) = table.read_table().unwrap(); let cond = get_location_released(a, &mut self.machine, self.value_stack.pop().unwrap()); - let mut table = vec![0usize; targets.len()]; + let table_label = a.get_label(); + let mut table: Vec = vec![]; let default_br = a.get_label(); Self::emit_relaxed_binop( a, @@ -4073,19 +4098,16 @@ impl FunctionCodeGenerator for X64FunctionCode { ); a.emit_jmp(Condition::AboveEqual, default_br); - a.emit_mov( - Size::S64, - Location::Imm64(table.as_ptr() as usize as u64), - Location::GPR(GPR::RCX), - ); + a.emit_lea_label(table_label, Location::GPR(GPR::RCX)); a.emit_mov(Size::S32, cond, Location::GPR(GPR::RDX)); - a.emit_shl(Size::S32, Location::Imm8(3), Location::GPR(GPR::RDX)); + a.emit_imul_imm32_gpr64(5, GPR::RDX); a.emit_add(Size::S64, Location::GPR(GPR::RCX), Location::GPR(GPR::RDX)); - a.emit_jmp_location(Location::Memory(GPR::RDX, 0)); + a.emit_jmp_location(Location::GPR(GPR::RDX)); - for (i, target) in targets.iter().enumerate() { - let AssemblyOffset(offset) = a.offset(); - table[i] = offset; + for target in targets.iter() { + let label = a.get_label(); + a.emit_label(label); + table.push(label); let frame = &self.control_stack[self.control_stack.len() - 1 - (*target as usize)]; if !frame.loop_like && frame.returns.len() > 0 { @@ -4120,7 +4142,10 @@ impl FunctionCodeGenerator for X64FunctionCode { a.emit_jmp(Condition::None, frame.label); } - self.br_table_data.as_mut().unwrap().push(table); + a.emit_label(table_label); + for x in table { + a.emit_jmp(Condition::None, x); + } self.unreachable_depth = 1; } Operator::Drop => { diff --git a/lib/singlepass-backend/src/emitter_x64.rs b/lib/singlepass-backend/src/emitter_x64.rs index 889b1099db1..f94de7013b3 100644 --- a/lib/singlepass-backend/src/emitter_x64.rs +++ b/lib/singlepass-backend/src/emitter_x64.rs @@ -89,6 +89,8 @@ pub trait Emitter { fn get_label(&mut self) -> Self::Label; fn get_offset(&mut self) -> Self::Offset; + fn emit_u64(&mut self, x: u64); + fn emit_label(&mut self, label: Self::Label); fn emit_mov(&mut self, sz: Size, src: Location, dst: Location); @@ -490,6 +492,10 @@ impl Emitter for Assembler { self.offset() } + fn emit_u64(&mut self, x: u64) { + self.push_u64(x); + } + fn emit_label(&mut self, label: Self::Label) { dynasm!(self ; => label); } diff --git a/src/bin/kwasmd.rs b/src/bin/kwasmd.rs new file mode 100644 index 00000000000..53e69060eab --- /dev/null +++ b/src/bin/kwasmd.rs @@ -0,0 +1,166 @@ +extern crate byteorder; +extern crate structopt; + +use std::thread; +use structopt::StructOpt; +use wasmer::*; +use wasmer_runtime::Value; +use wasmer_runtime_core::{ + self, + backend::{CompilerConfig, MemoryBoundCheckMode}, + loader::Instance as LoadedInstance, +}; +#[cfg(feature = "loader:kernel")] +use wasmer_singlepass_backend::SinglePassCompiler; + +use std::io::prelude::*; +#[cfg(feature = "loader:kernel")] +use std::os::unix::net::{UnixListener, UnixStream}; + +use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; + +#[derive(Debug, StructOpt)] +#[structopt(name = "kwasmd", about = "Kernel-mode WebAssembly service.")] +enum CLIOptions { + #[structopt(name = "listen")] + Listen(Listen), +} + +#[derive(Debug, StructOpt)] +struct Listen { + #[structopt(long = "socket")] + socket: String, +} + +const CMD_RUN_CODE: u32 = 0x901; +const CMD_READ_MEMORY: u32 = 0x902; +const CMD_WRITE_MEMORY: u32 = 0x903; + +#[cfg(feature = "loader:kernel")] +fn handle_client(mut stream: UnixStream) { + let binary_size = stream.read_u32::().unwrap(); + if binary_size > 1048576 * 16 { + println!("binary too large"); + return; + } + let mut wasm_binary: Vec = Vec::with_capacity(binary_size as usize); + unsafe { wasm_binary.set_len(binary_size as usize) }; + stream.read_exact(&mut wasm_binary).unwrap(); + let module = webassembly::compile_with_config_with( + &wasm_binary[..], + CompilerConfig { + symbol_map: None, + memory_bound_check_mode: MemoryBoundCheckMode::Disable, + enforce_stack_check: true, + }, + &SinglePassCompiler::new(), + ) + .unwrap(); + + let mut import_object = wasmer_runtime_core::import::ImportObject::new(); + import_object.allow_missing_functions = true; // Import initialization might be left to the loader. + let instance = module.instantiate(&import_object).unwrap(); + let mut ins = instance.load(::wasmer_kernel_loader::KernelLoader).unwrap(); + + loop { + let cmd = stream.read_u32::().unwrap(); + match cmd { + CMD_RUN_CODE => { + let func_name_len = stream.read_u32::().unwrap(); + if func_name_len > 32 { + println!("function name too long"); + return; + } + let mut func_name: Vec = Vec::with_capacity(func_name_len as usize); + unsafe { func_name.set_len(func_name_len as usize) }; + stream.read_exact(&mut func_name).unwrap(); + let func_name = ::std::str::from_utf8(&func_name).unwrap(); + let arg_count = stream.read_u32::().unwrap(); + if arg_count > 0 { + println!("Too many arguments"); + return; + } + let mut args: Vec = Vec::with_capacity(arg_count as usize); + for _ in 0..arg_count { + args.push(Value::I64(stream.read_u64::().unwrap() as _)); + } + + let index = instance.resolve_func(func_name).unwrap(); + let ret = ins.call(index, &args); + match ret { + Ok(x) => { + stream.write_u32::(1).unwrap(); + stream.write_u64::(x).unwrap(); + } + Err(e) => { + println!("Execution error: {:?}", e); + stream.write_u32::(0).unwrap(); + } + } + } + CMD_READ_MEMORY => { + let offset = stream.read_u32::().unwrap(); + let len = stream.read_u32::().unwrap(); + if len > 1048576 * 16 { + println!("memory size too large"); + return; + } + let buf = ins.read_memory(offset, len).unwrap(); + stream.write_all(&buf).unwrap(); + } + CMD_WRITE_MEMORY => { + let offset = stream.read_u32::().unwrap(); + let len = stream.read_u32::().unwrap(); + if len > 1048576 * 16 { + println!("memory size too large"); + return; + } + let mut buf: Vec = Vec::with_capacity(len as usize); + unsafe { buf.set_len(len as usize) }; + stream.read_exact(&mut buf).unwrap(); + ins.write_memory(offset, len, &buf).unwrap(); + } + _ => { + println!("Unknown command"); + return; + } + } + } +} + +#[cfg(feature = "loader:kernel")] +fn run_listen(opts: Listen) { + let listener = UnixListener::bind(&opts.socket).unwrap(); + for stream in listener.incoming() { + match stream { + Ok(stream) => { + thread::spawn(|| { + match ::std::panic::catch_unwind(::std::panic::AssertUnwindSafe(|| { + handle_client(stream); + })) { + Ok(()) => {} + Err(_) => {} + } + }); + } + Err(err) => { + panic!("{:?}", err); + } + } + } +} + +#[cfg(feature = "loader:kernel")] +fn main() { + let options = CLIOptions::from_args(); + match options { + CLIOptions::Listen(listen) => { + run_listen(listen); + } + } +} + +#[cfg(not(feature = "loader:kernel"))] +fn main() { + panic!("Kwasm loader is not enabled during compilation."); +} diff --git a/src/bin/wasmer.rs b/src/bin/wasmer.rs index 14386d1b18b..8231c60b410 100644 --- a/src/bin/wasmer.rs +++ b/src/bin/wasmer.rs @@ -24,7 +24,8 @@ use wasmer_runtime::{ }; use wasmer_runtime_core::{ self, - backend::{Compiler, CompilerConfig}, + backend::{Compiler, CompilerConfig, MemoryBoundCheckMode}, + loader::{Instance as LoadedInstance, LocalLoader}, }; #[cfg(feature = "backend:singlepass")] use wasmer_singlepass_backend::SinglePassCompiler; @@ -96,6 +97,13 @@ struct Run { #[structopt(long = "dir", multiple = true, group = "wasi")] pre_opened_directories: Vec, + // Custom code loader + #[structopt( + long = "loader", + raw(possible_values = "LoaderName::variants()", case_insensitive = "true") + )] + loader: Option, + #[structopt(long = "command-name", hidden = true)] command_name: Option, @@ -104,6 +112,36 @@ struct Run { args: Vec, } +#[allow(dead_code)] +#[derive(Debug, Copy, Clone)] +enum LoaderName { + Local, + #[cfg(feature = "loader:kernel")] + Kernel, +} + +impl LoaderName { + pub fn variants() -> &'static [&'static str] { + &[ + "local", + #[cfg(feature = "loader:kernel")] + "kernel", + ] + } +} + +impl FromStr for LoaderName { + type Err = String; + fn from_str(s: &str) -> Result { + match s.to_lowercase().as_str() { + "local" => Ok(LoaderName::Local), + #[cfg(feature = "loader:kernel")] + "kernel" => Ok(LoaderName::Kernel), + _ => Err(format!("The loader {} doesn't exist", s)), + } + } +} + #[allow(dead_code)] #[derive(Debug)] enum Backend { @@ -258,7 +296,38 @@ fn execute_wasm(options: &Run) -> Result<(), String> { Backend::LLVM => return Err("the llvm backend is not enabled".to_string()), }; - let module = if !disable_cache { + #[cfg(feature = "loader:kernel")] + let is_kernel_loader = if let Some(LoaderName::Kernel) = options.loader { + true + } else { + false + }; + + #[cfg(not(feature = "loader:kernel"))] + let is_kernel_loader = false; + + let module = if is_kernel_loader { + webassembly::compile_with_config_with( + &wasm_binary[..], + CompilerConfig { + symbol_map: em_symbol_map, + memory_bound_check_mode: MemoryBoundCheckMode::Disable, + enforce_stack_check: true, + }, + &*compiler, + ) + .map_err(|e| format!("Can't compile module: {:?}", e))? + } else if disable_cache { + webassembly::compile_with_config_with( + &wasm_binary[..], + CompilerConfig { + symbol_map: em_symbol_map, + ..Default::default() + }, + &*compiler, + ) + .map_err(|e| format!("Can't compile module: {:?}", e))? + } else { // If we have cache enabled // We generate a hash for the given binary, so we can use it as key @@ -287,6 +356,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> { &wasm_binary[..], CompilerConfig { symbol_map: em_symbol_map, + ..Default::default() }, &*compiler, ) @@ -298,17 +368,46 @@ fn execute_wasm(options: &Run) -> Result<(), String> { } }; module - } else { - webassembly::compile_with_config_with( - &wasm_binary[..], - CompilerConfig { - symbol_map: em_symbol_map, - }, - &*compiler, - ) - .map_err(|e| format!("Can't compile module: {:?}", e))? }; + if let Some(loader) = options.loader { + let mut import_object = wasmer_runtime_core::import::ImportObject::new(); + import_object.allow_missing_functions = true; // Import initialization might be left to the loader. + let instance = module + .instantiate(&import_object) + .map_err(|e| format!("Can't instantiate module: {:?}", e))?; + + let args: Vec = options + .args + .iter() + .map(|arg| arg.as_str()) + .map(|x| { + Value::I32(x.parse().expect(&format!( + "Can't parse the provided argument {:?} as a integer", + x + ))) + }) + .collect(); + let index = instance + .resolve_func("_start") + .expect("The loader requires a _start function to be present in the module"); + let mut ins: Box> = match loader { + LoaderName::Local => Box::new( + instance + .load(LocalLoader) + .expect("Can't use the local loader"), + ), + #[cfg(feature = "loader:kernel")] + LoaderName::Kernel => Box::new( + instance + .load(::wasmer_kernel_loader::KernelLoader) + .expect("Can't use the kernel loader"), + ), + }; + println!("{:?}", ins.call(index, &args)); + return Ok(()); + } + // TODO: refactor this if wasmer_emscripten::is_emscripten_module(&module) { let mut emscripten_globals = wasmer_emscripten::EmscriptenGlobals::new(&module);