Remove the Normal run mode
Since Fuchsia will no longer execute files from /tmp, this
mode is no longer needed. Instead the default mode is
to run by creating a package and letting fx serve
install/update it.
To make this change more ergonomic, fargo will provide
a default sandbox file that should work for binaries that
don't require any special permissions.
Also fixed a bug where the wrong flag for killall is
being passed on Linux.
Also updated the README.
Change-Id: Iebd3794825edd01f1ecde05e46c8fa6349b7eddf
diff --git a/Cargo.lock b/Cargo.lock
index fc8cc27..4f11b53 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5,7 +5,7 @@
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -13,19 +13,19 @@
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "backtrace"
-version = "0.3.33"
+version = "0.3.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -33,8 +33,8 @@
version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -44,17 +44,26 @@
[[package]]
name = "bitflags"
-version = "1.1.0"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "c2-chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "cc"
-version = "1.0.38"
+version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cfg-if"
-version = "0.1.9"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -64,36 +73,36 @@
dependencies = [
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (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)",
+ "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "either"
-version = "1.5.2"
+version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "failure"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "failure_derive"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)",
- "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "synstructure 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -101,13 +110,14 @@
version = "0.2.0"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "notify 4.0.12 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "structopt 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "notify 4.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)",
+ "structopt 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
"uname 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -121,12 +131,13 @@
[[package]]
name = "filetime"
-version = "0.2.5"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -134,7 +145,7 @@
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -143,7 +154,7 @@
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -159,7 +170,7 @@
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -177,6 +188,16 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "getrandom"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "heck"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -189,9 +210,9 @@
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -199,16 +220,15 @@
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "iovec"
-version = "0.1.2"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -216,7 +236,7 @@
version = "0.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -234,13 +254,18 @@
]
[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "lazycell"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
-version = "0.2.60"
+version = "0.2.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -248,7 +273,7 @@
version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -258,9 +283,9 @@
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (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)",
@@ -295,50 +320,47 @@
version = "0.2.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "notify"
-version = "4.0.12"
+version = "4.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "filetime 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"fsevent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
"mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)",
"mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
+name = "ppv-lite86"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "proc-macro-error"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "proc-macro2"
-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 = "proc-macro2"
-version = "1.0.3"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -346,18 +368,47 @@
[[package]]
name = "quote"
-version = "0.6.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "quote"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_hc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -366,13 +417,21 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "remove_dir_all"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "rustc-demangle"
-version = "0.1.15"
+version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "ryu"
-version = "1.0.0"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -385,27 +444,30 @@
[[package]]
name = "serde"
-version = "1.0.98"
+version = "1.0.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)",
+]
[[package]]
name = "serde_derive"
-version = "1.0.98"
+version = "1.0.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_json"
-version = "1.0.40"
+version = "1.0.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -420,54 +482,57 @@
[[package]]
name = "structopt"
-version = "0.3.1"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "structopt-derive 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "structopt-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "structopt-derive"
-version = "0.3.1"
+version = "0.3.3"
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-macro-error 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "syn"
-version = "0.15.42"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "syn"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "synstructure"
-version = "0.10.2"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)",
- "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
+ "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -475,7 +540,7 @@
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)",
+ "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -483,7 +548,7 @@
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -491,7 +556,7 @@
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -501,12 +566,7 @@
[[package]]
name = "unicode-width"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
-name = "unicode-xid"
-version = "0.1.0"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -525,18 +585,23 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
+name = "wasi"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi"
-version = "0.3.7"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -558,7 +623,7 @@
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -578,68 +643,75 @@
[metadata]
"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90"
-"checksum backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)" = "88fb679bc9af8fa639198790a77f52d345fe13656c08b43afa9424c206b731c6"
+"checksum backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)" = "690a62be8920ccf773ee00ef0968649b0e724cda8bd5b12286302b4ae955fdf5"
"checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
-"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd"
-"checksum cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "ce400c638d48ee0e9ab75aef7997609ec57367ccfe1463f21bf53c3eca67bf46"
-"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33"
+"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
+"checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101"
+"checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be"
+"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
-"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b"
-"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 filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2f8c63033fcba1f51ef744505b3cad42510432b904c062afa67ad7ece008429d"
+"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
+"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"
+"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
+"checksum filetime 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd7380b54ced79dda72ecc35cc4fbbd1da6bba54afaa37e96fd1c2a308cd469"
"checksum fsevent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6"
"checksum fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0"
"checksum fuchsia-zircon 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c0581a4e363262e52b87f59ee2afe3415361c6ec35e665924eb08afe8ff159"
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
"checksum fuchsia-zircon-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "43f3795b4bae048dc6123a6b972cadde2e676f9ded08aef6bb77f5f157684a82"
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
+"checksum getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571"
"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718"
"checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0"
-"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08"
+"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
"checksum itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0d47946d458e94a1b7bcabbf6521ea7c037062c81f534615abcad76e84d4970d"
"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.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"
-"checksum libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d44e80633f007889c7eff624b709ab43c92d708caad982295768a7b13ca3b5eb"
+"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23"
"checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40"
"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
-"checksum notify 4.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3572d71f13ea8ed41867accd971fd564aa75934cf7a1fae03ddb8c74a8a49943"
+"checksum notify 4.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1191efa2b8fe041decb55c238a125b7a1aeb6fad7a525133a02be5ec949ff3cb"
+"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b"
"checksum proc-macro-error 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aeccfe4d5d8ea175d5f0e4a2ad0637e0f4121d63bd99d356fb1f39ab2e7c6097"
-"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
-"checksum proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e98a83a9f9b331f54b924e68a66acb1bb35cb01fb0a23645139967abefb697e8"
-"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
+"checksum proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90cf5f418035b98e655e9cdb225047638296b862b42411c4e45bb88d700f7fc0"
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
+"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412"
+"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853"
+"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
-"checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af"
-"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997"
+"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e"
+"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
+"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421"
-"checksum serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5626ac617da2f2d9c48af5515a21d5a480dbd151e01bb1c355e26a3e68113"
-"checksum serde_derive 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)" = "01e69e1b8a631f245467ee275b8c757b818653c6d704cdbcaeb56b56767b529c"
-"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704"
+"checksum serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "9796c9b7ba2ffe7a9ce53c2287dfc48080f4b2b362fcc245a259b3a7201119dd"
+"checksum serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e"
+"checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2"
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
-"checksum structopt 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ac9d6e93dd792b217bf89cda5c14566e3043960c6f9da890c2ba5d09d07804c"
-"checksum structopt-derive 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ae9e5165d463a0dea76967d021f8d0f9316057bf5163aa2a4843790e842ff37"
-"checksum syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)" = "eadc09306ca51a40555dd6fc2b415538e9e18bc9f870e47b1a524a79fe2dcf5e"
+"checksum structopt 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4f66a4c0ddf7aee4677995697366de0749b0139057342eccbb609b12d0affc"
+"checksum structopt-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8fe0c13e476b4e21ff7f5c4ace3818b6d7bdc16897c31c73862471bc1663acae"
"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf"
-"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f"
+"checksum synstructure 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f085a5855930c0441ca1288cf044ea4aecf4f43a91668abdb870b4ba546a203"
+"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f"
"checksum uname 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b72f89f0ca32e4db1c04e2a72f5345d59796d4866a1ee0609084569f73683dc8"
"checksum unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1967f4cdfc355b37fd76d2a954fb2ed3871034eb4f26d60537d88795cfc332a9"
-"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
-"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
+"checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20"
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
"checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e"
+"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
-"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770"
+"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9"
diff --git a/Cargo.toml b/Cargo.toml
index d07347e..6dd17c2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,10 +10,11 @@
itertools = "0.7"
uname = "0.1.1"
notify = "4.0.0"
-serde = "1.0"
+serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"
serde_json = "1.0"
structopt = "0.3"
+tempfile = "3.1"
toml = "0.4"
[[bin]]
diff --git a/README.md b/README.md
index 73b35d3..a367707 100644
--- a/README.md
+++ b/README.md
@@ -1,39 +1,40 @@
# fargo
- fargo v0.2.0
- Fargo is a prototype Fuchsia-specific wrapper around Cargo
+ fargo 0.2.0
+ Fargo is a prototype Fuchsia-specific wrapper around Cargo.
USAGE:
- fargo [FLAGS] [OPTIONS] [SUBCOMMAND]
+ fargo [FLAGS] [OPTIONS] <SUBCOMMAND>
FLAGS:
- --disable-cross-env Disable the setting of CC, AR and such environmental variables.
+ --disable-cross-env Disable the setting of CC, AR and such environmental variables
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose Print verbose output while performing commands
OPTIONS:
- -N, --device-name <device-name> Name of device to target, needed if there are multiple devices
- visible on the network
+ -N, --device-name <device-name> Name of device to target, needed if there are multiple devices visible on the
+ network
--manifest-path <manifest-path> Path to Cargo.toml
SUBCOMMANDS:
autotest Auto build and test in Fuchsia device or emulator
build Build binary targeting Fuchsia device or emulator
build-rustc Build rustc targeting Fuchsia
- cargo Run a cargo command for Fuchsia. Use -- to indicate that all following arguments
- should be passed to cargo.
+ cargo Run a cargo command for Fuchsia. Use -- to indicate that all following arguments should be
+ passed to cargo.
check Check binary targeting Fuchsia device or emulator
configure Run a configure script for the cross compilation environment
doc Build a package's documentation
enable-networking Enable networking for a running emulator
+ fmt Run cargo fmt using the Fuchsia toolchain
help Prints this message or the help of the given subcommand(s)
list-devices List visible Fuchsia devices
- load-driver Build driver and load it on Fuchsia device or emulator.
make-package Make a Fuchsia package from an unstripped binary
pkg-config Run pkg-config for the cross compilation environment
restart Stop all Fuchsia emulators and start a new one
run Run binary on Fuchsia device or emulator
+ run-on-target Act as as custom runner for Cargo targeting a Fuchsia device
ssh Open a shell on Fuchsia device or emulator
start Start a Fuchsia emulator
stop Stop all Fuchsia emulators
@@ -50,7 +51,8 @@
The [Fuchsia Getting
Started](https://fuchsia.googlesource.com/fuchsia/+/master/docs/getting_started.md)
-instruction are what you need.
+instruction are what you need. Make sure that `fx serve` is running pointed at
+this Fuchsia build.
Once this build is complete, clone and build fargo. For this you will need
a working host Rust installation, most easily installed with [rustup](https://rustup.rs).
@@ -81,11 +83,14 @@
rust project.
Additionally, if you are using qemu you need to enable networking, otherwise fargo won't be able to
-copy the binary onto then fuchsia machine to run the tests.
+use `fx shell` to invoke the test binary.
### Escaping parameters
-Sometimes you want to pass parameters through fargo and cargo and on to something like rustc. To make this easier fargo will convert a "++" parameter to "--" when invoking cargo. For example, the following command:
+Sometimes you want to pass parameters through fargo and cargo and on to
+somethinglike rustc. To make this easier fargo will convert a "++"
+parameter to "--" when invoking cargo. For example, the following
+command:
fargo cargo rustc -- ++ --emit=llvm-ir
@@ -111,11 +116,10 @@
## Getting help
-For problems getting the Fuchsia build to complete, the #fuchsia IRC channel on
-freenode is the best bet.
+For problems getting the Fuchsia build to complete, the [getting started](https://fuchsia.dev/fuchsia-src/getting_started.md)
+page on [fuchsia.dev](https://fuchsia.dev) is the best place to start looking for help.
-For fargo itself, that IRC channel can also work of one of the more Rust-aware
-folks happens to be paying attention. More reliable is the
+For fargo itself, the best place for help is the
[rust-fuchsia](https://groups.google.com/a/fuchsia.com/forum/#!aboutgroup/rust-fuchsia) Google group.
## Using different versions of cargo and rustc
diff --git a/src/command_line.rs b/src/command_line.rs
index 94093c1..6c48e4c 100644
--- a/src/command_line.rs
+++ b/src/command_line.rs
@@ -146,7 +146,7 @@
/// Path to sandbox file to use when running.
#[structopt(long)]
- cmx_path: PathBuf,
+ cmx_path: Option<PathBuf>,
/// Name of app as it appears in the manifest file.
#[structopt(long, default_value = "app")]
@@ -412,7 +412,7 @@
verbose,
release: false,
nocapture: false,
- run_mode: RunMode::Normal,
+ run_mode: RunMode::Run,
story_name: None,
mod_name: None,
disable_cross: opt.disable_cross_env,
@@ -527,8 +527,7 @@
params.push(example);
}
- let run_mode =
- run_switches_to_mode(run.run_with_tiles, run.run_with_run, run.run_with_sessionctl);
+ let run_mode = run_switches_to_mode(run.run_with_tiles, run.run_with_sessionctl);
return run_binary(
&run_cargo_options
.release(run.release)
@@ -548,7 +547,6 @@
let run_params: Vec<&str> = run_on_target.runner_args.iter().map(|s| &**s).collect();
let run_mode = run_switches_to_mode(
run_on_target.run_with_tiles,
- run_on_target.run_with_run,
run_on_target.run_with_sessionctl,
);
@@ -621,7 +619,7 @@
let test_args = test_opts.test_args;
- let run_mode = run_switches_to_mode(false, test_opts.run_with_run, false);
+ let run_mode = run_switches_to_mode(false, false);
return run_tests(
&run_cargo_options
.cmx_path(test_opts.cmx_path)
diff --git a/src/device.rs b/src/device.rs
index 66412b7..7dd98eb 100644
--- a/src/device.rs
+++ b/src/device.rs
@@ -8,7 +8,7 @@
use crate::utils::is_mac;
use failure::{bail, err_msg, Error, ResultExt};
use std::env;
-use std::path::{Path, PathBuf};
+use std::path::Path;
use std::process::{Command, Stdio};
use std::{str, thread, time};
@@ -55,47 +55,6 @@
"ConnectTimeout=20",
];
-pub fn scp_to_device(
- verbose: bool,
- config: &FuchsiaConfig,
- netaddr: &str,
- source_path: &PathBuf,
- destination_path: &str,
-) -> Result<(), Error> {
- let destination_with_address = format!("[{}]:{}", netaddr, destination_path);
- let ssh_config = target_out_dir(config)?.join("ssh-keys/ssh_config");
- if !ssh_config.exists() {
- bail!("ssh config not found at {:?}", ssh_config);
- }
- if verbose {
- println!("destination_with_address = {}", destination_with_address);
- println!("ssh_config = {:?}", ssh_config);
- }
-
- let mut scp_command = Command::new("scp");
-
- scp_command
- .env_remove("SSH_AUTH_SOCK")
- .arg(if verbose { "-v" } else { "-q" })
- .arg("-F")
- .arg(ssh_config)
- .args(SSH_OPTIONS)
- .arg(source_path)
- .arg(destination_with_address);
-
- if verbose {
- println!("{:?}", scp_command);
- }
-
- let scp_result = scp_command.status().context("unable to run scp")?;
-
- if !scp_result.success() {
- bail!("scp failed with error {:?}", scp_result);
- }
-
- Ok(())
-}
-
pub fn ssh(
verbose: bool,
config: &FuchsiaConfig,
@@ -306,7 +265,8 @@
}
pub fn stop_emulator() -> Result<(), Error> {
- Command::new("killall").arg("-9").arg("-m").arg("qemu-system-x86_64.*").status()?;
+ let reg_ex_flag = if is_mac() { "-m" } else { "-r" };
+ Command::new("killall").arg("-9").arg(reg_ex_flag).arg("qemu-system-x86_64.*").status()?;
Ok(())
}
diff --git a/src/lib.rs b/src/lib.rs
index cbc037b..807f43e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -19,18 +19,15 @@
pub use crate::sdk::{FuchsiaConfig, TargetOptions};
use crate::cross::{pkg_config_path, run_configure};
-use crate::device::{enable_networking, netaddr, scp_to_device, ssh};
+use crate::device::{enable_networking, ssh};
use crate::package::make_package;
-use crate::{
- sdk::{
- cargo_path, clang_archiver_path, clang_c_compiler_path, clang_cpp_compiler_path,
- clang_ranlib_path, clang_resource_dir, rustc_path, rustdoc_path, shared_libraries_path,
- sysroot_path, zircon_build_path,
- },
- utils::strip_binary,
+use crate::sdk::{
+ cargo_path, clang_archiver_path, clang_c_compiler_path, clang_cpp_compiler_path,
+ clang_ranlib_path, clang_resource_dir, rustc_path, rustdoc_path, shared_libraries_path,
+ sysroot_path, zircon_build_path,
};
-use failure::{bail, err_msg, format_err, Error, ResultExt};
+use failure::{bail, err_msg, Error, ResultExt};
use std::fs;
use std::fs::File;
use std::io::Write;
@@ -38,28 +35,6 @@
use std::process::Command;
use std::time::SystemTime;
-fn copy_to_target(
- source_path: &PathBuf,
- verbose: bool,
- config: &FuchsiaConfig,
- target_options: &TargetOptions<'_, '_>,
-) -> Result<String, Error> {
- let netaddr = netaddr(verbose, target_options)?;
- if verbose {
- println!("netaddr {}", netaddr);
- }
- let destination_path = format!(
- "/tmp/{}",
- source_path
- .file_name()
- .ok_or(format_err!("file_name failed on {:#?}", source_path))?
- .to_string_lossy()
- );
- println!("copying {} to {}", source_path.to_string_lossy(), destination_path);
- scp_to_device(verbose, config, &netaddr, &source_path, &destination_path)?;
- Ok(destination_path)
-}
-
fn run_program_on_target(
filename: &str,
verbose: bool,
@@ -75,37 +50,20 @@
test_args: Option<&str>,
) -> Result<(), Error> {
let source_path = PathBuf::from(&filename);
- let target_string = match run_mode {
- RunMode::Normal => {
- let stripped_source_path = strip_binary(&source_path)?;
- copy_to_target(&stripped_source_path, verbose, config, target_options)?
- }
- _ => {
- if cmx_path.is_none() {
- bail!("Run modes other than normal require a path to a cmx file");
- }
- make_package(
- verbose,
- target_options,
- &source_path,
- cmx_path.as_ref().unwrap(),
- app_name,
- )?
- }
- };
+
+ let target_string = make_package(verbose, target_options, &source_path, cmx_path, app_name)?;
let mut command_string = match run_mode {
RunMode::Tiles => "tiles_ctl add ".to_string(),
- RunMode::Ermine => {
+ RunMode::SessionCtl => {
format!("sessionctl --story_name={} --mod_name={} --mod_url=", story_name, mod_name)
}
RunMode::Run => "run ".to_string(),
- RunMode::Normal => "".to_string(),
};
command_string.push_str(&target_string);
match run_mode {
- RunMode::Ermine => {
+ RunMode::SessionCtl => {
command_string.push_str(" add_mod");
}
_ => (),
@@ -252,26 +210,23 @@
#[derive(Clone, Copy, Debug)]
pub enum RunMode {
- Normal,
Run,
Tiles,
- Ermine,
+ SessionCtl,
}
impl Default for RunMode {
fn default() -> Self {
- RunMode::Normal
+ RunMode::Run
}
}
-fn run_switches_to_mode(tiles: bool, run: bool, ermine: bool) -> RunMode {
+fn run_switches_to_mode(tiles: bool, session_ctl: bool) -> RunMode {
if tiles {
RunMode::Tiles
- } else if run {
- RunMode::Run
- } else if ermine {
- RunMode::Ermine
+ } else if session_ctl {
+ RunMode::SessionCtl
} else {
- RunMode::Normal
+ RunMode::Run
}
}
@@ -383,6 +338,10 @@
format!("-Clink-arg=-L{}", sysroot_lib),
format!("-Clink-arg=-L{}/gen/zircon/public/lib/fdio", shared_lib_path.to_string_lossy(),),
format!("-Clink-arg=-L{}/gen/zircon/public/lib/syslog", shared_lib_path.to_string_lossy(),),
+ format!(
+ "-Clink-arg=-L{}/gen/zircon/public/lib/trace-engine",
+ shared_lib_path.to_string_lossy(),
+ ),
format!("-Clink-arg=-L{}", clang_resource_lib.to_string_lossy()),
format!("-Clink-arg=--sysroot={}", sysroot_as_path.to_string_lossy()),
format!("-Lnative={}", shared_libraries_path(target_options)?.to_string_lossy()),
@@ -404,7 +363,7 @@
) -> Result<String, Error> {
let cmx_path;
let tiles_arg = format!("--{}", RUN_WITH_TILES);
- let ermine_arg = format!(
+ let session_ctl_arg = format!(
"--{} --story-name={} --mod-name={}",
RUN_WITH_SESSIONCTL,
options.get_story_name(),
@@ -440,13 +399,6 @@
cmx_path = passed_path.to_string_lossy().to_string();
runner_args.push(&cmx_arg);
runner_args.push(&cmx_path);
- } else {
- match options.run_mode {
- RunMode::Normal => (),
- _ => {
- bail!("Run modes other than normal require a path to a cmx file");
- }
- }
}
if nocapture {
@@ -454,9 +406,8 @@
}
match options.run_mode {
- RunMode::Normal => (),
RunMode::Tiles => runner_args.push(&tiles_arg),
- RunMode::Ermine => runner_args.push(&ermine_arg),
+ RunMode::SessionCtl => runner_args.push(&session_ctl_arg),
RunMode::Run => runner_args.push(&run_arg),
}
@@ -504,7 +455,7 @@
/// verbose: false,
/// release: true,
/// nocapture: false,
-/// run_mode: RunMode::Normal,
+/// run_mode: RunMode::Run,
/// story_name: None,
/// mod_name: None,
/// disable_cross: false,
diff --git a/src/package.rs b/src/package.rs
index e5fcab4..7815820 100644
--- a/src/package.rs
+++ b/src/package.rs
@@ -3,21 +3,48 @@
// found in the LICENSE file.
use crate::{
+ get_triple_cpu,
sdk::{
amber_path, clang_base_path, cmc_path, fuchsia_dir, package_manager_path,
shared_libraries_path, zircon_build_path, FuchsiaConfig, TargetOptions,
},
utils::strip_binary,
- get_triple_cpu,
};
use failure::{bail, format_err, Error, ResultExt};
+use serde::{Deserialize, Serialize};
use serde_json::json;
use std::{
+ collections::HashMap,
fs::{create_dir_all, File},
io::Write,
path::{Path, PathBuf},
process::Command,
};
+use tempfile::{tempdir, TempDir};
+
+#[derive(Serialize, Deserialize)]
+struct Sandbox {
+ services: Vec<String>,
+}
+#[derive(Serialize, Deserialize)]
+
+struct SandboxFile {
+ program: HashMap<String, String>,
+ sandbox: Sandbox,
+}
+
+fn default_sandbox_file(temp_dir: &TempDir) -> Result<PathBuf, Error> {
+ let path = temp_dir.path().join("default.cmx");
+ let services = vec![];
+ let sandbox = Sandbox { services };
+ let mut program = HashMap::new();
+ program.insert("binary".to_string(), "bin/app".to_string());
+ let sandbox_file = SandboxFile { program, sandbox };
+ let serialized_sandbox_file = serde_json::to_string(&sandbox_file).expect("serialized");
+ let mut temp_sandbox_file = File::create(&path)?;
+ writeln!(temp_sandbox_file, "{}", serialized_sandbox_file)?;
+ Ok(path)
+}
fn validate_cmx_file(
verbose: bool,
@@ -43,9 +70,15 @@
Ok(())
}
-fn format_cmx_file(fuchsia_config: &FuchsiaConfig, cmx_path: &Path) -> Result<PathBuf, Error> {
+fn format_cmx_file(
+ fuchsia_config: &FuchsiaConfig,
+ cmx_path: &Path,
+ temp_dir: &TempDir,
+) -> Result<PathBuf, Error> {
+ let temp_dir_str = temp_dir.path().to_string_lossy();
let destination_path = format!(
- "/tmp/{}",
+ "{}/{}",
+ temp_dir_str,
cmx_path
.file_name()
.ok_or(format_err!("file_name failed on {:#?}", cmx_path))?
@@ -206,6 +239,13 @@
.output()
.context("Running `cmc` to format cmx file")?;
+ if verbose {
+ println!("pm build stdout: {}", String::from_utf8_lossy(&output.stdout));
+ if output.status.success() {
+ println!("pm build stderr: {}", String::from_utf8_lossy(&output.stderr));
+ }
+ }
+
if !output.status.success() {
bail!("pm returned error: {}", String::from_utf8_lossy(&output.stderr));
}
@@ -234,6 +274,13 @@
.output()
.context("Running `pm_archive` to build an archive")?;
+ if verbose {
+ println!("pm archive stdout: {}", String::from_utf8_lossy(&output.stdout));
+ if output.status.success() {
+ println!("pm archive stderr: {}", String::from_utf8_lossy(&output.stderr));
+ }
+ }
+
if !output.status.success() {
bail!("pm returned error: {}", String::from_utf8_lossy(&output.stderr));
}
@@ -264,6 +311,13 @@
.output()
.context("Running `publish` to publish package")?;
+ if verbose {
+ println!("pm publish stdout: {}", String::from_utf8_lossy(&output.stdout));
+ if output.status.success() {
+ println!("pm publish stderr: {}", String::from_utf8_lossy(&output.stderr));
+ }
+ }
+
if !output.status.success() {
bail!("pm returned error: {}", String::from_utf8_lossy(&output.stderr));
}
@@ -275,9 +329,18 @@
verbose: bool,
target_options: &TargetOptions<'_, '_>,
binary_path: &Path,
- cmx_path: &Path,
+ optional_cmx_path: &Option<PathBuf>,
app_name: &str,
) -> Result<String, Error> {
+ let temp_dir = tempdir()?;
+ let dfs;
+ let cmx_path = if let Some(path) = optional_cmx_path.as_ref() {
+ path
+ } else {
+ dfs = default_sandbox_file(&temp_dir)?;
+ &dfs
+ };
+
let binary_parent =
binary_path.parent().expect(&format!("Can't get parent of {:#?}", binary_path));
let mut package_name = binary_path
@@ -295,11 +358,11 @@
}
create_dir_all(&output_path).context("create_dir_all failed")?;
let stripped_binary_path = strip_binary(binary_path)?;
- validate_cmx_file(verbose, &target_options.config, cmx_path)?;
- let formatted_path = format_cmx_file(&target_options.config, cmx_path)?;
- let package_path = PathBuf::from("/tmp/package");
+ validate_cmx_file(verbose, &target_options.config, &cmx_path)?;
+ let formatted_path = format_cmx_file(&target_options.config, &cmx_path, &temp_dir)?;
+ let package_path = temp_dir.path().join("package");
write_package_file(verbose, &package_path, &package_name)?;
- let manifest_path = PathBuf::from("/tmp/manifest");
+ let manifest_path = temp_dir.path().join("manifest");
write_manifest_file(
verbose,
&target_options,