From 1f9ad52dd0f12e87d547f82894277b033f2734de Mon Sep 17 00:00:00 2001 From: Eran Rundstein Date: Tue, 3 May 2022 12:59:53 -0700 Subject: [PATCH 1/3] mobilecoind-json uses new(er) rocket --- Cargo.lock | 585 ++++++++++++++++++++++++++++++- mobilecoind-json/Cargo.toml | 3 +- mobilecoind-json/src/bin/main.rs | 78 ++--- 3 files changed, 606 insertions(+), 60 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 306922feb1..ddb130ad5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,6 +97,15 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "anyhow" version = "1.0.57" @@ -171,6 +180,27 @@ dependencies = [ "tokio 1.16.1", ] +[[package]] +name = "async-stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +dependencies = [ + "proc-macro2 1.0.37", + "quote 1.0.18", + "syn 1.0.91", +] + [[package]] name = "async-trait" version = "0.1.52" @@ -182,6 +212,15 @@ dependencies = [ "syn 1.0.92", ] +[[package]] +name = "atomic" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c" +dependencies = [ + "autocfg", +] + [[package]] name = "atty" version = "0.2.14" @@ -224,6 +263,12 @@ dependencies = [ "rand_core 0.6.3", ] +[[package]] +name = "base-x" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc19a4937b4fbd3fe3379793130e42060d10627a360f2127802b10b87e7baf74" + [[package]] name = "base64" version = "0.9.3" @@ -675,7 +720,7 @@ version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" dependencies = [ - "ansi_term", + "ansi_term 0.11.0", "atty", "bitflags", "strsim 0.8.0", @@ -768,6 +813,12 @@ dependencies = [ "cache-padded", ] +[[package]] +name = "const_fn" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -784,6 +835,17 @@ dependencies = [ "time 0.1.43", ] +[[package]] +name = "cookie" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f1c7727e460397e56abc4bddc1d49e07a1ad78fc98eb2e1c8f032a58a2f80d" +dependencies = [ + "percent-encoding 2.1.0", + "time 0.2.27", + "version_check 0.9.3", +] + [[package]] name = "cookie" version = "0.16.0" @@ -1144,8 +1206,18 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74e04ba2d03c5fa0d954c061fc8c9c288badadffc272ebb87679a89846de3ed3" dependencies = [ - "devise_codegen", - "devise_core", + "devise_codegen 0.2.0", + "devise_core 0.2.0", +] + +[[package]] +name = "devise" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c7580b072f1c8476148f16e0a0d5dedddab787da98d86c5082c5e9ed8ab595" +dependencies = [ + "devise_codegen 0.3.1", + "devise_core 0.3.1", ] [[package]] @@ -1154,10 +1226,20 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "066ceb7928ca93a9bedc6d0e612a8a0424048b0ab1f75971b203d01420c055d7" dependencies = [ - "devise_core", + "devise_core 0.2.0", "quote 0.6.13", ] +[[package]] +name = "devise_codegen" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "123c73e7a6e51b05c75fe1a1b2f4e241399ea5740ed810b0e3e6cacd9db5e7b2" +dependencies = [ + "devise_core 0.3.1", + "quote 1.0.18", +] + [[package]] name = "devise_core" version = "0.2.0" @@ -1170,6 +1252,19 @@ dependencies = [ "syn 0.15.44", ] +[[package]] +name = "devise_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841ef46f4787d9097405cac4e70fb8644fc037b526e8c14054247c0263c400d0" +dependencies = [ + "bitflags", + "proc-macro2 1.0.37", + "proc-macro2-diagnostics", + "quote 1.0.18", + "syn 1.0.91", +] + [[package]] name = "diesel" version = "1.4.8" @@ -1304,6 +1399,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "discard" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" + [[package]] name = "displaydoc" version = "0.2.3" @@ -1454,6 +1555,20 @@ dependencies = [ "instant", ] +[[package]] +name = "figment" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790b4292c72618abbab50f787a477014fe15634f96291de45672ce46afe122df" +dependencies = [ + "atomic", + "pear 0.2.3", + "serde", + "toml 0.5.9", + "uncased", + "version_check 0.9.3", +] + [[package]] name = "filetime" version = "0.2.9" @@ -1676,6 +1791,19 @@ dependencies = [ "slab", ] +[[package]] +name = "generator" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1d9279ca822891c1a4dae06d185612cf8fc6acfe5dff37781b41297811b12ee" +dependencies = [ + "cc", + "libc", + "log 0.4.14", + "rustversion", + "winapi 0.3.9", +] + [[package]] name = "generic-array" version = "0.12.3" @@ -2151,8 +2279,15 @@ checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" dependencies = [ "autocfg", "hashbrown", + "serde", ] +[[package]] +name = "inlinable_string" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" + [[package]] name = "inotify" version = "0.7.0" @@ -2465,6 +2600,21 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "loom" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc5c7d328e32cc4954e8e01193d7f0ef5ab257b5090b70a964e099a36034309" +dependencies = [ + "cfg-if 1.0.0", + "generator", + "scoped-tls", + "serde", + "serde_json", + "tracing", + "tracing-subscriber", +] + [[package]] name = "maplit" version = "1.0.2" @@ -2477,6 +2627,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata", +] + [[package]] name = "matches" version = "0.1.8" @@ -2577,7 +2736,7 @@ dependencies = [ "mc-common", "mc-util-grpc", "mc-util-uri", - "rocket", + "rocket 0.4.10", "rocket_contrib", "serde", "serde_derive", @@ -4005,7 +4164,7 @@ dependencies = [ "rand_hc 0.3.1", "regex", "retry", - "rocket", + "rocket 0.4.10", "rocket_contrib", "serde", "tempdir", @@ -4837,8 +4996,7 @@ dependencies = [ "mc-util-grpc", "protobuf", "rand 0.8.5", - "rocket", - "rocket_contrib", + "rocket 0.5.0-rc.1", "serde", "serde_derive", "serde_with", @@ -5840,6 +5998,26 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" +[[package]] +name = "multer" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f8f35e687561d5c1667590911e6698a8cb714a134a7505718a182e7bc9d3836" +dependencies = [ + "bytes 1.1.0", + "encoding_rs", + "futures-util", + "http 0.2.1", + "httparse", + "log 0.4.14", + "memchr", + "mime 0.3.16", + "spin 0.9.3", + "tokio 1.16.1", + "tokio-util", + "version_check 0.9.3", +] + [[package]] name = "net2" version = "0.2.34" @@ -6160,7 +6338,18 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5320f212db967792b67cfe12bd469d08afd6318a249bd917d5c19bc92200ab8a" dependencies = [ - "pear_codegen", + "pear_codegen 0.1.4", +] + +[[package]] +name = "pear" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e44241c5e4c868e3eaa78b7c1848cadd6344ed4f54d029832d32b415a58702" +dependencies = [ + "inlinable_string", + "pear_codegen 0.2.3", + "yansi", ] [[package]] @@ -6176,6 +6365,18 @@ dependencies = [ "yansi", ] +[[package]] +name = "pear_codegen" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82a5ca643c2303ecb740d506539deba189e16f2754040a42901cd8105d0282d0" +dependencies = [ + "proc-macro2 1.0.37", + "proc-macro2-diagnostics", + "quote 1.0.18", + "syn 1.0.91", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -6365,6 +6566,12 @@ dependencies = [ "version_check 0.9.3", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + [[package]] name = "proc-macro2" version = "0.4.30" @@ -6383,6 +6590,19 @@ dependencies = [ "unicode-xid 0.2.2", ] +[[package]] +name = "proc-macro2-diagnostics" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" +dependencies = [ + "proc-macro2 1.0.37", + "quote 1.0.18", + "syn 1.0.91", + "version_check 0.9.3", + "yansi", +] + [[package]] name = "prometheus" version = "0.13.0" @@ -6716,6 +6936,26 @@ dependencies = [ "redox_syscall 0.2.10", ] +[[package]] +name = "ref-cast" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685d58625b6c2b83e4cc88a27c4bf65adb7b6b16dbdc413e515c9405b47432ab" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a043824e29c94169374ac5183ac0ed43f5724dc4556b19568007486bd840fa1f" +dependencies = [ + "proc-macro2 1.0.37", + "quote 1.0.18", + "syn 1.0.91", +] + [[package]] name = "regex" version = "1.5.5" @@ -6734,6 +6974,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" dependencies = [ "byteorder", + "regex-syntax", ] [[package]] @@ -6832,31 +7073,86 @@ dependencies = [ "log 0.4.14", "memchr", "num_cpus", - "pear", - "rocket_codegen", - "rocket_http", - "state", + "pear 0.1.4", + "rocket_codegen 0.4.10", + "rocket_http 0.4.10", + "state 0.4.1", "time 0.1.43", "toml 0.4.10", "version_check 0.9.3", "yansi", ] +[[package]] +name = "rocket" +version = "0.5.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a71c18c42a0eb15bf3816831caf0dad11e7966f2a41aaf486a701979c4dd1f2" +dependencies = [ + "async-stream", + "async-trait", + "atomic", + "atty", + "binascii", + "bytes 1.1.0", + "either", + "figment", + "futures 0.3.21", + "indexmap", + "log 0.4.14", + "memchr", + "multer", + "num_cpus", + "parking_lot 0.11.2", + "pin-project-lite", + "rand 0.8.5", + "ref-cast", + "rocket_codegen 0.5.0-rc.1", + "rocket_http 0.5.0-rc.1", + "serde", + "serde_json", + "state 0.5.3", + "tempfile", + "time 0.2.27", + "tokio 1.16.1", + "tokio-stream", + "tokio-util", + "ubyte", + "version_check 0.9.3", + "yansi", +] + [[package]] name = "rocket_codegen" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729e687d6d2cf434d174da84fb948f7fef4fac22d20ce94ca61c28b72dbcf9f" dependencies = [ - "devise", + "devise 0.2.0", "glob 0.3.0", "indexmap", "quote 0.6.13", - "rocket_http", + "rocket_http 0.4.10", "version_check 0.9.3", "yansi", ] +[[package]] +name = "rocket_codegen" +version = "0.5.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66f5fa462f7eb958bba8710c17c5d774bbbd59809fa76fb1957af7e545aea8bb" +dependencies = [ + "devise 0.3.1", + "glob 0.3.0", + "indexmap", + "proc-macro2 1.0.37", + "quote 1.0.18", + "rocket_http 0.5.0-rc.1", + "syn 1.0.91", + "unicode-xid 0.2.2", +] + [[package]] name = "rocket_contrib" version = "0.4.10" @@ -6865,7 +7161,7 @@ checksum = "6b6303dccab46dce6c7ac26c9b9d8d8cde1b19614b027c3f913be6611bff6d9b" dependencies = [ "log 0.4.14", "notify", - "rocket", + "rocket 0.4.10", "serde", "serde_json", ] @@ -6879,14 +7175,42 @@ dependencies = [ "cookie 0.11.3", "hyper 0.10.16", "indexmap", - "pear", + "pear 0.1.4", "percent-encoding 1.0.1", "smallvec 1.6.1", - "state", + "state 0.4.1", "time 0.1.43", "unicode-xid 0.1.0", ] +[[package]] +name = "rocket_http" +version = "0.5.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23c8b7d512d2fcac2316ebe590cde67573844b99e6cc9ee0f53375fa16e25ebd" +dependencies = [ + "cookie 0.15.1", + "either", + "http 0.2.1", + "hyper 0.14.16", + "indexmap", + "log 0.4.14", + "memchr", + "mime 0.3.16", + "parking_lot 0.11.2", + "pear 0.2.3", + "percent-encoding 2.1.0", + "pin-project-lite", + "ref-cast", + "serde", + "smallvec 1.6.1", + "stable-pattern", + "state 0.5.3", + "time 0.2.27", + "tokio 1.16.1", + "uncased", +] + [[package]] name = "rs-libc" version = "0.2.2" @@ -7127,6 +7451,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "scoped-tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" + [[package]] name = "scoped_threadpool" version = "0.1.9" @@ -7415,6 +7745,21 @@ dependencies = [ "syn 1.0.92", ] +[[package]] +name = "sha1" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + [[package]] name = "sha2" version = "0.8.2" @@ -7471,6 +7816,15 @@ dependencies = [ "keccak", ] +[[package]] +name = "sharded-slab" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +dependencies = [ + "lazy_static", +] + [[package]] name = "shlex" version = "0.1.1" @@ -7704,12 +8058,94 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c530c2b0d0bf8b69304b39fe2001993e267461948b890cd037d8ad4293fa1a0d" + +[[package]] +name = "stable-pattern" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4564168c00635f88eaed410d5efa8131afa8d8699a612c80c455a0ba05c21045" +dependencies = [ + "memchr", +] + +[[package]] +name = "standback" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" +dependencies = [ + "version_check 0.9.3", +] + [[package]] name = "state" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" +[[package]] +name = "state" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe866e1e51e8260c9eed836a042a5e7f6726bb2b411dffeaa712e19c388f23b" +dependencies = [ + "loom", +] + +[[package]] +name = "stdweb" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" +dependencies = [ + "discard", + "rustc_version 0.2.3", + "stdweb-derive", + "stdweb-internal-macros", + "stdweb-internal-runtime", + "wasm-bindgen", +] + +[[package]] +name = "stdweb-derive" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +dependencies = [ + "proc-macro2 1.0.37", + "quote 1.0.18", + "serde", + "serde_derive", + "syn 1.0.91", +] + +[[package]] +name = "stdweb-internal-macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +dependencies = [ + "base-x", + "proc-macro2 1.0.37", + "quote 1.0.18", + "serde", + "serde_derive", + "serde_json", + "sha1", + "syn 1.0.91", +] + +[[package]] +name = "stdweb-internal-runtime" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" + [[package]] name = "string" version = "0.2.1" @@ -7914,6 +8350,21 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "time" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" +dependencies = [ + "const_fn", + "libc", + "standback", + "stdweb", + "time-macros 0.1.1", + "version_check 0.9.3", + "winapi 0.3.9", +] + [[package]] name = "time" version = "0.3.9" @@ -7923,7 +8374,17 @@ dependencies = [ "itoa 1.0.1", "libc", "num_threads", - "time-macros", + "time-macros 0.2.4", +] + +[[package]] +name = "time-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" +dependencies = [ + "proc-macro-hack", + "time-macros-impl", ] [[package]] @@ -7932,6 +8393,19 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" +[[package]] +name = "time-macros-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" +dependencies = [ + "proc-macro-hack", + "proc-macro2 1.0.37", + "quote 1.0.18", + "standback", + "syn 1.0.91", +] + [[package]] name = "tiny-bip39" version = "0.8.2" @@ -8011,7 +8485,10 @@ dependencies = [ "memchr", "mio 0.7.14", "num_cpus", + "once_cell", "pin-project-lite", + "signal-hook-registry", + "tokio-macros", "winapi 0.3.9", ] @@ -8079,6 +8556,17 @@ dependencies = [ "log 0.4.14", ] +[[package]] +name = "tokio-macros" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +dependencies = [ + "proc-macro2 1.0.37", + "quote 1.0.18", + "syn 1.0.91", +] + [[package]] name = "tokio-process" version = "0.2.5" @@ -8159,6 +8647,17 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "tokio-stream" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio 1.16.1", +] + [[package]] name = "tokio-sync" version = "0.1.8" @@ -8326,6 +8825,35 @@ dependencies = [ "tracing", ] +[[package]] +name = "tracing-log" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +dependencies = [ + "lazy_static", + "log 0.4.14", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77be66445c4eeebb934a7340f227bfe7b338173d3f8c00a60a5a58005c9faecf" +dependencies = [ + "ansi_term 0.12.1", + "lazy_static", + "matchers", + "regex", + "sharded-slab", + "smallvec 1.6.1", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + [[package]] name = "traitobject" version = "0.1.0" @@ -8356,6 +8884,15 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +[[package]] +name = "ubyte" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42756bb9e708855de2f8a98195643dff31a97f0485d90d8467b39dc24be9e8fe" +dependencies = [ + "serde", +] + [[package]] name = "uname" version = "0.1.1" @@ -8365,6 +8902,16 @@ dependencies = [ "libc", ] +[[package]] +name = "uncased" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baeed7327e25054889b9bd4f975f32e5f4c5d434042d59ab6cd4142c0a76ed0" +dependencies = [ + "serde", + "version_check 0.9.3", +] + [[package]] name = "unicase" version = "1.4.2" diff --git a/mobilecoind-json/Cargo.toml b/mobilecoind-json/Cargo.toml index 89de9eea6d..694436a2d2 100644 --- a/mobilecoind-json/Cargo.toml +++ b/mobilecoind-json/Cargo.toml @@ -18,8 +18,7 @@ clap = { version = "3.1", features = ["derive", "env"] } grpcio = "0.10.2" hex = "0.4" protobuf = "2.27.1" -rocket = { version = "0.4.10", default-features = false } -rocket_contrib = { version = "0.4.10", default-features = false, features = ["json"] } +rocket = { version = "0.5.0-rc.1", features = ["json"] } serde = "1.0" serde_derive = "1.0" serde_with = "1.12" diff --git a/mobilecoind-json/src/bin/main.rs b/mobilecoind-json/src/bin/main.rs index ea98e95e61..b33ae17e82 100644 --- a/mobilecoind-json/src/bin/main.rs +++ b/mobilecoind-json/src/bin/main.rs @@ -13,8 +13,7 @@ use mc_mobilecoind_api::{mobilecoind_api_grpc::MobilecoindApiClient, Mobilecoind use mc_mobilecoind_json::data_types::*; use mc_util_grpc::ConnectionUriGrpcioChannel; use protobuf::RepeatedField; -use rocket::{delete, get, post, routes}; -use rocket_contrib::json::Json; +use rocket::{delete, get, post, routes, serde::json::Json}; use std::{convert::TryFrom, sync::Arc}; /// Command line config, set with defaults that will work with @@ -47,7 +46,7 @@ struct State { /// Set the password for the mobilecoind-db #[post("/set-password", format = "json", data = "")] fn set_password( - state: rocket::State, + state: &rocket::State, password: Json, ) -> Result, String> { let mut req = mc_mobilecoind_api::SetDbPasswordRequest::new(); @@ -65,7 +64,7 @@ fn set_password( /// Unlock a previously-encrypted mobilecoind-db #[post("/unlock-db", format = "json", data = "")] fn unlock_db( - state: rocket::State, + state: &rocket::State, password: Json, ) -> Result, String> { let mut req = mc_mobilecoind_api::UnlockDbRequest::new(); @@ -82,7 +81,7 @@ fn unlock_db( /// Requests a new root entropy from mobilecoind #[post("/entropy")] -fn entropy(state: rocket::State) -> Result, String> { +fn entropy(state: &rocket::State) -> Result, String> { let resp = state .mobilecoind_api_client .generate_root_entropy(&mc_mobilecoind_api::Empty::new()) @@ -92,7 +91,7 @@ fn entropy(state: rocket::State) -> Result, #[get("/entropy/")] fn account_key_from_root_entropy( - state: rocket::State, + state: &rocket::State, root_entropy: String, ) -> Result, String> { let entropy = @@ -111,7 +110,7 @@ fn account_key_from_root_entropy( /// Requests a new mnemonic from mobilecoind #[post("/mnemonic")] -fn mnemonic(state: rocket::State) -> Result, String> { +fn mnemonic(state: &rocket::State) -> Result, String> { let resp = state .mobilecoind_api_client .generate_mnemonic(&mc_mobilecoind_api::Empty::new()) @@ -121,7 +120,7 @@ fn mnemonic(state: rocket::State) -> Result, S #[post("/account-key-from-mnemonic", format = "json", data = "")] fn account_key_from_mnemonic( - state: rocket::State, + state: &rocket::State, mnemonic: Json, ) -> Result, String> { let mut req = mc_mobilecoind_api::GetAccountKeyFromMnemonicRequest::new(); @@ -139,7 +138,7 @@ fn account_key_from_mnemonic( /// above. #[post("/monitors", format = "json", data = "")] fn add_monitor( - state: rocket::State, + state: &rocket::State, monitor: Json, ) -> Result, String> { let mut account_key = mc_mobilecoind_api::external::AccountKey::new(); @@ -172,7 +171,7 @@ fn add_monitor( /// Remove a monitor #[delete("/monitors/")] -fn remove_monitor(state: rocket::State, monitor_hex: String) -> Result<(), String> { +fn remove_monitor(state: &rocket::State, monitor_hex: String) -> Result<(), String> { let monitor_id = hex::decode(monitor_hex).map_err(|err| format!("Failed to decode monitor hex: {}", err))?; @@ -189,7 +188,7 @@ fn remove_monitor(state: rocket::State, monitor_hex: String) -> Result<() /// Gets a list of existing monitors #[get("/monitors")] -fn monitors(state: rocket::State) -> Result, String> { +fn monitors(state: &rocket::State) -> Result, String> { let resp = state .mobilecoind_api_client .get_monitor_list(&mc_mobilecoind_api::Empty::new()) @@ -200,7 +199,7 @@ fn monitors(state: rocket::State) -> Result /// Get the current status of a created monitor #[get("/monitors/")] fn monitor_status( - state: rocket::State, + state: &rocket::State, monitor_hex: String, ) -> Result, String> { let monitor_id = @@ -220,7 +219,7 @@ fn monitor_status( /// Balance check using a created monitor and subaddress index #[get("/monitors//subaddresses//balance")] fn balance( - state: rocket::State, + state: &rocket::State, monitor_hex: String, subaddress_index: u64, ) -> Result, String> { @@ -241,7 +240,7 @@ fn balance( #[get("/monitors//subaddresses//utxos")] fn utxos( - state: rocket::State, + state: &rocket::State, monitor_hex: String, subaddress_index: u64, ) -> Result, String> { @@ -263,7 +262,7 @@ fn utxos( /// Balance check using a created monitor and subaddress index #[get("/monitors//subaddresses//public-address")] fn public_address( - state: rocket::State, + state: &rocket::State, monitor_hex: String, subaddress_index: u64, ) -> Result, String> { @@ -286,7 +285,7 @@ fn public_address( /// Generates a request code with an optional value and memo #[post("/codes/request", format = "json", data = "")] fn create_request_code( - state: rocket::State, + state: &rocket::State, request: Json, ) -> Result, String> { let receiver = mc_mobilecoind_api::external::PublicAddress::try_from(&request.receiver) @@ -313,7 +312,7 @@ fn create_request_code( /// Retrieves the data in a request b58_code #[get("/codes/request/")] fn parse_request_code( - state: rocket::State, + state: &rocket::State, b58_code: String, ) -> Result, String> { let mut req = mc_mobilecoind_api::ParseRequestCodeRequest::new(); @@ -332,7 +331,7 @@ fn parse_request_code( /// Generates an address code #[post("/codes/address", format = "json", data = "")] fn create_address_code( - state: rocket::State, + state: &rocket::State, request: Json, ) -> Result, String> { let receiver = mc_mobilecoind_api::external::PublicAddress::try_from(&request.receiver) @@ -353,7 +352,7 @@ fn create_address_code( /// Retrieves the data in an address b58_code #[get("/codes/address/")] fn parse_address_code( - state: rocket::State, + state: &rocket::State, b58_code: String, ) -> Result, String> { let mut req = mc_mobilecoind_api::ParseAddressCodeRequest::new(); @@ -375,7 +374,7 @@ fn parse_address_code( data = "" )] fn build_and_submit( - state: rocket::State, + state: &rocket::State, monitor_hex: String, subaddress_index: u64, transfer: Json, @@ -425,7 +424,7 @@ fn build_and_submit( data = "" )] fn pay_address_code( - state: rocket::State, + state: &rocket::State, monitor_hex: String, subaddress_index: u64, transfer: Json, @@ -473,7 +472,7 @@ fn pay_address_code( data = "" )] fn generate_request_code_transaction( - state: rocket::State, + state: &rocket::State, monitor_hex: String, subaddress_index: u64, request: Json, @@ -515,7 +514,7 @@ fn generate_request_code_transaction( /// Submit a prepared TxProposal #[post("/submit-tx", format = "json", data = "")] fn submit_tx( - state: rocket::State, + state: &rocket::State, proposal: Json, ) -> Result, String> { // Send the payment request @@ -537,7 +536,7 @@ fn submit_tx( /// Checks the status of a transfer given a key image and tombstone block #[post("/tx/status-as-sender", format = "json", data = "")] fn check_transfer_status( - state: rocket::State, + state: &rocket::State, submit_response: Json, ) -> Result, String> { let resp = state @@ -564,7 +563,7 @@ fn check_transfer_status( data = "" )] fn check_receiver_transfer_status( - state: rocket::State, + state: &rocket::State, monitor_hex: String, receipt: Json, ) -> Result, String> { @@ -596,7 +595,7 @@ fn check_receiver_transfer_status( /// Gets information about the entire ledger #[get("/ledger/local")] -fn ledger_info(state: rocket::State) -> Result, String> { +fn ledger_info(state: &rocket::State) -> Result, String> { let resp = state .mobilecoind_api_client .get_ledger_info(&mc_mobilecoind_api::Empty::new()) @@ -608,7 +607,7 @@ fn ledger_info(state: rocket::State) -> Result/header")] fn block_info( - state: rocket::State, + state: &rocket::State, block_num: u64, ) -> Result, String> { let mut req = mc_mobilecoind_api::GetBlockInfoRequest::new(); @@ -625,7 +624,7 @@ fn block_info( /// Retrieves the details for a given block. #[get("/ledger/blocks/")] fn block_details( - state: rocket::State, + state: &rocket::State, block_num: u64, ) -> Result, String> { let mut req = mc_mobilecoind_api::GetBlockRequest::new(); @@ -641,7 +640,7 @@ fn block_details( /// Retreives processed block information. #[get("/monitors//processed-block/")] fn processed_block( - state: rocket::State, + state: &rocket::State, monitor_hex: String, block_num: u64, ) -> Result, String> { @@ -663,7 +662,7 @@ fn processed_block( /// Get the block index of a given tx out, identified by its public key. #[get("/tx-out//block-index")] fn tx_out_get_block_index_by_public_key( - state: rocket::State, + state: &rocket::State, public_key_hex: String, ) -> Result, String> { let tx_out_public_key = hex::decode(public_key_hex) @@ -686,7 +685,7 @@ fn tx_out_get_block_index_by_public_key( #[post("/tx-out/proof-of-membership", format = "json", data = "")] /// Get a proof of membership for each queried TxOut. fn get_proof_of_membership( - state: rocket::State, + state: &rocket::State, request: Json, ) -> Result, String> { // Requested TxOuts. @@ -728,7 +727,7 @@ fn get_proof_of_membership( #[post("/tx-out/mixin", format = "json", data = "")] /// Get a list of TxOuts for use as mixins. fn get_mixins( - state: rocket::State, + state: &rocket::State, request: Json, ) -> Result, String> { let num_mixins = request.num_mixins; @@ -767,7 +766,8 @@ fn get_mixins( Ok(Json(response)) } -fn main() { +#[rocket::main] +async fn main() -> Result<(), rocket::Error> { mc_common::setup_panic_handler(); let _sentry_guard = mc_common::sentry::init(); @@ -791,12 +791,11 @@ fn main() { let mobilecoind_api_client = MobilecoindApiClient::new(ch); - let rocket_config = rocket::Config::build(rocket::config::Environment::Production) - .address(&config.listen_host) - .port(config.listen_port) - .unwrap(); + let figment = rocket::Config::figment() + .merge(("port", config.listen_port)) + .merge(("address", config.listen_host.clone())); - rocket::custom(rocket_config) + rocket::custom(figment) .mount( "/", routes![ @@ -835,5 +834,6 @@ fn main() { .manage(State { mobilecoind_api_client, }) - .launch(); + .launch() + .await } From c4ff8633b5df677ba8abc7ae9b392dc11bb9da87 Mon Sep 17 00:00:00 2001 From: Eran Rundstein Date: Tue, 3 May 2022 13:31:19 -0700 Subject: [PATCH 2/3] admin gw uses newer rocket --- Cargo.lock | 3 +-- admin-http-gateway/Cargo.toml | 3 +-- admin-http-gateway/src/main.rs | 28 +++++++++++++++------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ddb130ad5a..d686804de4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2736,8 +2736,7 @@ dependencies = [ "mc-common", "mc-util-grpc", "mc-util-uri", - "rocket 0.4.10", - "rocket_contrib", + "rocket 0.5.0-rc.1", "serde", "serde_derive", "serde_json", diff --git a/admin-http-gateway/Cargo.toml b/admin-http-gateway/Cargo.toml index 8d539d9287..f61607f41b 100644 --- a/admin-http-gateway/Cargo.toml +++ b/admin-http-gateway/Cargo.toml @@ -11,8 +11,7 @@ mc-util-uri = { path = "../util/uri" } clap = { version = "3.1", features = ["derive", "env"] } grpcio = "0.10.2" -rocket = { version = "0.4.10", default-features = false } -rocket_contrib = { version = "0.4.10", default-features = false, features = ["json"] } +rocket = { version = "0.5.0-rc.1", features = ["json"] } serde = "1.0" serde_derive = "1.0" serde_json = "1.0" diff --git a/admin-http-gateway/src/main.rs b/admin-http-gateway/src/main.rs index 415a5e2e95..1bda68980f 100644 --- a/admin-http-gateway/src/main.rs +++ b/admin-http-gateway/src/main.rs @@ -11,12 +11,13 @@ use mc_common::logger::{create_app_logger, log, o}; use mc_util_grpc::{admin, admin_grpc::AdminApiClient, ConnectionUriGrpcioChannel, Empty}; use mc_util_uri::AdminUri; use rocket::{ + form::Form, get, post, - request::Form, response::{content, Redirect}, - routes, FromForm, + routes, + serde::json::Json, + FromForm, }; -use rocket_contrib::json::Json; use serde_derive::Serialize; use std::{convert::TryFrom, sync::Arc}; @@ -79,7 +80,7 @@ impl TryFrom<&admin::GetInfoResponse> for JsonInfoResponse { } #[get("/info")] -fn info(state: rocket::State) -> Result, String> { +fn info(state: &rocket::State) -> Result, String> { let info = state .admin_api_client .get_info(&Empty::new()) @@ -95,7 +96,7 @@ struct SetRustLogForm { #[post("/set-rust-log", data = "
")] fn set_rust_log( - state: rocket::State, + state: &rocket::State, form: Form, ) -> Result { let mut req = admin::SetRustLogRequest::new(); @@ -110,7 +111,7 @@ fn set_rust_log( } #[get("/metrics")] -fn metrics(state: rocket::State) -> Result { +fn metrics(state: &rocket::State) -> Result { let resp = state .admin_api_client .get_prometheus_metrics(&Empty::new()) @@ -118,7 +119,8 @@ fn metrics(state: rocket::State) -> Result { Ok(resp.metrics) } -fn main() { +#[rocket::main] +async fn main() -> Result<(), rocket::Error> { mc_common::setup_panic_handler(); let _sentry_guard = mc_common::sentry::init(); @@ -138,13 +140,13 @@ fn main() { ChannelBuilder::default_channel_builder(env).connect_to_uri(&config.admin_uri, &logger); let admin_api_client = AdminApiClient::new(ch); - let rocket_config = rocket::Config::build(rocket::config::Environment::Production) - .address(&config.listen_host) - .port(config.listen_port) - .unwrap(); + let figment = rocket::Config::figment() + .merge(("port", config.listen_port)) + .merge(("address", config.listen_host.clone())); - rocket::custom(rocket_config) + rocket::custom(figment) .mount("/", routes![index, info, set_rust_log, metrics]) .manage(State { admin_api_client }) - .launch(); + .launch() + .await } From 7983a6ffb5cfe13eb2c5324de3dd337401699ad4 Mon Sep 17 00:00:00 2001 From: Eran Rundstein Date: Tue, 3 May 2022 14:06:44 -0700 Subject: [PATCH 3/3] fog-overseer-server uses newer rocket --- Cargo.lock | 842 +++++------------- fog/overseer/server/Cargo.toml | 3 +- fog/overseer/server/src/bin/main.rs | 13 +- fog/overseer/server/src/server.rs | 19 +- .../server/tests/get_ingest_summaries.rs | 17 +- ..._outstanding_key_idle_does_not_have_key.rs | 13 +- .../inactive_outstanding_key_idle_has_key.rs | 13 +- fog/overseer/server/tests/one_active_node.rs | 13 +- .../tests/prometheus_produces_metrics.rs | 17 +- ...t_outstanding_idles_have_different_keys.rs | 13 +- ...key_not_outstanding_idles_have_same_key.rs | 14 +- 11 files changed, 288 insertions(+), 689 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d686804de4..486340d5d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -196,9 +196,9 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.91", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -207,9 +207,9 @@ version = "0.1.52" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -269,16 +269,6 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc19a4937b4fbd3fe3379793130e42060d10627a360f2127802b10b87e7baf74" -[[package]] -name = "base64" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -dependencies = [ - "byteorder", - "safemem", -] - [[package]] name = "base64" version = "0.10.1" @@ -338,10 +328,10 @@ dependencies = [ "env_logger 0.8.3", "lazy_static", "lazycell", - "log 0.4.14", + "log", "peeking_take_while", - "proc-macro2 1.0.37", - "quote 1.0.18", + "proc-macro2", + "quote", "regex", "rustc-hash", "shlex 1.0.0", @@ -361,10 +351,10 @@ dependencies = [ "env_logger 0.9.0", "lazy_static", "lazycell", - "log 0.4.14", + "log", "peeking_take_while", - "proc-macro2 1.0.37", - "quote 1.0.18", + "proc-macro2", + "quote", "regex", "rustc-hash", "shlex 1.0.0", @@ -628,14 +618,14 @@ dependencies = [ "clap 3.1.12", "heck", "indexmap", - "log 0.4.14", - "proc-macro2 1.0.37", - "quote 1.0.18", + "log", + "proc-macro2", + "quote", "serde", "serde_json", - "syn 1.0.92", + "syn", "tempfile", - "toml 0.5.9", + "toml", ] [[package]] @@ -754,9 +744,9 @@ checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -825,25 +815,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -[[package]] -name = "cookie" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5795cda0897252e34380a27baf884c53aa7ad9990329cdad96d4c5d027015d44" -dependencies = [ - "percent-encoding 2.1.0", - "time 0.1.43", -] - [[package]] name = "cookie" version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f1c7727e460397e56abc4bddc1d49e07a1ad78fc98eb2e1c8f032a58a2f80d" dependencies = [ - "percent-encoding 2.1.0", + "percent-encoding", "time 0.2.27", - "version_check 0.9.3", + "version_check", ] [[package]] @@ -853,7 +833,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94d4706de1b0fa5b132270cddffa8585166037822e260a944fe161acd137ca05" dependencies = [ "time 0.3.9", - "version_check 0.9.3", + "version_check", ] [[package]] @@ -1173,10 +1153,10 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.37", - "quote 1.0.18", + "proc-macro2", + "quote", "strsim 0.10.0", - "syn 1.0.92", + "syn", ] [[package]] @@ -1186,8 +1166,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", - "quote 1.0.18", - "syn 1.0.92", + "quote", + "syn", ] [[package]] @@ -1200,34 +1180,14 @@ dependencies = [ "uuid", ] -[[package]] -name = "devise" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74e04ba2d03c5fa0d954c061fc8c9c288badadffc272ebb87679a89846de3ed3" -dependencies = [ - "devise_codegen 0.2.0", - "devise_core 0.2.0", -] - [[package]] name = "devise" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50c7580b072f1c8476148f16e0a0d5dedddab787da98d86c5082c5e9ed8ab595" dependencies = [ - "devise_codegen 0.3.1", - "devise_core 0.3.1", -] - -[[package]] -name = "devise_codegen" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "066ceb7928ca93a9bedc6d0e612a8a0424048b0ab1f75971b203d01420c055d7" -dependencies = [ - "devise_core 0.2.0", - "quote 0.6.13", + "devise_codegen", + "devise_core", ] [[package]] @@ -1236,20 +1196,8 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "123c73e7a6e51b05c75fe1a1b2f4e241399ea5740ed810b0e3e6cacd9db5e7b2" dependencies = [ - "devise_core 0.3.1", - "quote 1.0.18", -] - -[[package]] -name = "devise_core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf41c59b22b5e3ec0ea55c7847e5f358d340f3a8d6d53a5cf4f1564967f96487" -dependencies = [ - "bitflags", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "devise_core", + "quote", ] [[package]] @@ -1259,10 +1207,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841ef46f4787d9097405cac4e70fb8644fc037b526e8c14054247c0263c400d0" dependencies = [ "bitflags", - "proc-macro2 1.0.37", + "proc-macro2", "proc-macro2-diagnostics", - "quote 1.0.18", - "syn 1.0.91", + "quote", + "syn", ] [[package]] @@ -1286,9 +1234,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8910921b014e2af16298f006de12aa08af894b71f0f49a486ab6d74b17bbed" dependencies = [ "heck", - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1297,9 +1245,9 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1411,9 +1359,9 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1475,7 +1423,7 @@ checksum = "17392a012ea30ef05a610aa97dfb49496e71c9f676b27879922ea5bdf60d9d3f" dependencies = [ "atty", "humantime", - "log 0.4.14", + "log", "regex", "termcolor", ] @@ -1488,7 +1436,7 @@ checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" dependencies = [ "atty", "humantime", - "log 0.4.14", + "log", "regex", "termcolor", ] @@ -1509,7 +1457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd" dependencies = [ "backtrace", - "version_check 0.9.3", + "version_check", ] [[package]] @@ -1534,9 +1482,9 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", "synstructure", ] @@ -1562,23 +1510,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790b4292c72618abbab50f787a477014fe15634f96291de45672ce46afe122df" dependencies = [ "atomic", - "pear 0.2.3", + "pear", "serde", - "toml 0.5.9", + "toml", "uncased", - "version_check 0.9.3", -] - -[[package]] -name = "filetime" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f59efc38004c988e4201d11d263b8171f49a2e7ec0bdbb71773433f271504a5e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "redox_syscall 0.1.56", - "winapi 0.3.9", + "version_check", ] [[package]] @@ -1615,7 +1551,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ "matches", - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] @@ -1630,25 +1566,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" -[[package]] -name = "fsevent" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" -dependencies = [ - "bitflags", - "fsevent-sys", -] - -[[package]] -name = "fsevent-sys" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" -dependencies = [ - "libc", -] - [[package]] name = "fuchsia-cprng" version = "0.1.1" @@ -1756,9 +1673,9 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1799,7 +1716,7 @@ checksum = "c1d9279ca822891c1a4dae06d185612cf8fc6acfe5dff37781b41297811b12ee" dependencies = [ "cc", "libc", - "log 0.4.14", + "log", "rustversion", "winapi 0.3.9", ] @@ -1821,7 +1738,7 @@ checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" dependencies = [ "serde", "typenum", - "version_check 0.9.3", + "version_check", ] [[package]] @@ -1913,7 +1830,7 @@ dependencies = [ "futures-util", "grpcio-sys", "libc", - "log 0.4.14", + "log", "parking_lot 0.11.2", "protobuf", ] @@ -1955,7 +1872,7 @@ dependencies = [ "futures 0.1.29", "http 0.1.21", "indexmap", - "log 0.4.14", + "log", "slab", "string", "tokio-io", @@ -2140,25 +2057,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "hyper" -version = "0.10.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" -dependencies = [ - "base64 0.9.3", - "httparse", - "language-tags", - "log 0.3.9", - "mime 0.2.6", - "num_cpus", - "time 0.1.43", - "traitobject", - "typeable", - "unicase", - "url 1.7.2", -] - [[package]] name = "hyper" version = "0.12.35" @@ -2174,7 +2072,7 @@ dependencies = [ "httparse", "iovec", "itoa 0.4.8", - "log 0.4.14", + "log", "net2", "rustc_version 0.2.3", "time 0.1.43", @@ -2249,17 +2147,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.2.0" @@ -2288,26 +2175,6 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" -[[package]] -name = "inotify" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e40d6fd5d64e2082e0c796495c8ef5ad667a96d03e5aaa0becfd9d47bcbfb8" -dependencies = [ - "bitflags", - "inotify-sys", - "libc", -] - -[[package]] -name = "inotify-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" -dependencies = [ - "libc", -] - [[package]] name = "instant" version = "0.1.11" @@ -2352,14 +2219,14 @@ dependencies = [ "event-listener", "futures-lite", "http 0.2.1", - "log 0.4.14", + "log", "once_cell", "polling", "slab", "sluice", "tracing", "tracing-futures", - "url 2.2.2", + "url", "waker-fn", ] @@ -2393,7 +2260,7 @@ dependencies = [ "cesu8", "combine", "jni-sys", - "log 0.4.14", + "log", "thiserror", "walkdir", ] @@ -2435,12 +2302,6 @@ dependencies = [ "winapi-build", ] -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - [[package]] name = "lazy_static" version = "1.4.0" @@ -2582,15 +2443,6 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -dependencies = [ - "log 0.4.14", -] - [[package]] name = "log" version = "0.4.14" @@ -2679,8 +2531,8 @@ dependencies = [ "lazy_static", "libc", "libz-sys", - "quote 1.0.18", - "syn 1.0.92", + "quote", + "syn", ] [[package]] @@ -2736,7 +2588,7 @@ dependencies = [ "mc-common", "mc-util-grpc", "mc-util-uri", - "rocket 0.5.0-rc.1", + "rocket", "serde", "serde_derive", "serde_json", @@ -2916,7 +2768,7 @@ dependencies = [ "mc-sgx-build", "mc-util-encodings", "pem", - "percent-encoding 2.1.0", + "percent-encoding", "rand 0.8.5", "reqwest", "serde_json", @@ -3215,7 +3067,7 @@ dependencies = [ "rand 0.8.5", "serde", "serde_json", - "toml 0.5.9", + "toml", ] [[package]] @@ -3337,7 +3189,7 @@ dependencies = [ "pem", "serde", "serde_json", - "toml 0.5.9", + "toml", ] [[package]] @@ -3393,9 +3245,9 @@ dependencies = [ name = "mc-crypto-digestible-derive" version = "1.3.0-pre0" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -3859,7 +3711,7 @@ dependencies = [ "serde", "serde_json", "tempdir", - "url 2.2.2", + "url", ] [[package]] @@ -4040,7 +3892,7 @@ dependencies = [ "serde", "serde_json", "tempdir", - "url 2.2.2", + "url", ] [[package]] @@ -4163,11 +4015,10 @@ dependencies = [ "rand_hc 0.3.1", "regex", "retry", - "rocket 0.4.10", - "rocket_contrib", + "rocket", "serde", "tempdir", - "url 2.2.2", + "url", ] [[package]] @@ -4507,7 +4358,7 @@ dependencies = [ "rand_hc 0.3.1", "serde", "serde_json", - "url 2.2.2", + "url", ] [[package]] @@ -4790,7 +4641,7 @@ dependencies = [ "rusoto_s3", "serde", "serde_json", - "url 2.2.2", + "url", ] [[package]] @@ -4845,7 +4696,7 @@ dependencies = [ "retry", "serde", "tempdir", - "url 2.2.2", + "url", ] [[package]] @@ -4995,7 +4846,7 @@ dependencies = [ "mc-util-grpc", "protobuf", "rand 0.8.5", - "rocket 0.5.0-rc.1", + "rocket", "serde", "serde_derive", "serde_with", @@ -5428,7 +5279,7 @@ dependencies = [ "cargo-emit", "displaydoc", "lazy_static", - "url 2.2.2", + "url", "walkdir", ] @@ -5546,7 +5397,7 @@ dependencies = [ "hex", "mc-common", "mc-util-grpc", - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] @@ -5595,9 +5446,9 @@ dependencies = [ name = "mc-util-logger-macros" version = "1.3.0-pre0" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -5698,9 +5549,9 @@ dependencies = [ name = "mc-util-test-with-data" version = "1.3.0-pre0" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -5714,11 +5565,11 @@ dependencies = [ "mc-crypto-keys", "mc-util-from-random", "mc-util-host-cert", - "percent-encoding 2.1.0", + "percent-encoding", "rand 0.8.5", "rand_hc 0.3.1", "serde", - "url 2.2.2", + "url", ] [[package]] @@ -5761,8 +5612,8 @@ dependencies = [ "serde", "serial_test", "tempdir", - "toml 0.5.9", - "url 2.2.2", + "toml", + "url", ] [[package]] @@ -5831,18 +5682,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9753f12909fd8d923f75ae5c3258cae1ed3c8ec052e1b38c93c21a6d157f789c" dependencies = [ "migrations_internals", - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", -] - -[[package]] -name = "mime" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -dependencies = [ - "log 0.3.9", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -5888,7 +5730,7 @@ dependencies = [ "iovec", "kernel32-sys", "libc", - "log 0.4.14", + "log", "miow 0.2.1", "net2", "slab", @@ -5902,31 +5744,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" dependencies = [ "libc", - "log 0.4.14", + "log", "miow 0.3.7", "ntapi", "winapi 0.3.9", ] -[[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log 0.4.14", - "mio 0.6.22", - "slab", -] - [[package]] name = "mio-named-pipes" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" dependencies = [ - "log 0.4.14", + "log", "mio 0.6.22", "miow 0.3.7", "winapi 0.3.9", @@ -5986,9 +5816,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79ef208208a0dea3f72221e26e904cdc6db2e481d9ade89081ddd494f1dbaa6b" dependencies = [ "cfg-if 1.0.0", - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -6008,13 +5838,13 @@ dependencies = [ "futures-util", "http 0.2.1", "httparse", - "log 0.4.14", + "log", "memchr", - "mime 0.3.16", + "mime", "spin 0.9.3", "tokio 1.16.1", "tokio-util", - "version_check 0.9.3", + "version_check", ] [[package]] @@ -6035,7 +5865,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" dependencies = [ "memchr", - "version_check 0.9.3", + "version_check", ] [[package]] @@ -6046,7 +5876,7 @@ checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" dependencies = [ "memchr", "minimal-lexical", - "version_check 0.9.3", + "version_check", ] [[package]] @@ -6055,24 +5885,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -[[package]] -name = "notify" -version = "4.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80ae4a7688d1fab81c5bf19c64fc8db920be8d519ce6336ed4e7efe024724dbd" -dependencies = [ - "bitflags", - "filetime", - "fsevent", - "fsevent-sys", - "inotify", - "libc", - "mio 0.6.22", - "mio-extras", - "walkdir", - "winapi 0.3.9", -] - [[package]] name = "ntapi" version = "0.3.6" @@ -6196,7 +6008,7 @@ dependencies = [ "futures-util", "js-sys", "lazy_static", - "percent-encoding 2.1.0", + "percent-encoding", "pin-project", "rand 0.8.5", "thiserror", @@ -6331,15 +6143,6 @@ dependencies = [ "crypto-mac 0.8.0", ] -[[package]] -name = "pear" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5320f212db967792b67cfe12bd469d08afd6318a249bd917d5c19bc92200ab8a" -dependencies = [ - "pear_codegen 0.1.4", -] - [[package]] name = "pear" version = "0.2.3" @@ -6347,20 +6150,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15e44241c5e4c868e3eaa78b7c1848cadd6344ed4f54d029832d32b415a58702" dependencies = [ "inlinable_string", - "pear_codegen 0.2.3", - "yansi", -] - -[[package]] -name = "pear_codegen" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc1c836fdc3d1ef87c348b237b5b5c4dff922156fb2d968f57734f9669768ca" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", - "version_check 0.9.3", + "pear_codegen", "yansi", ] @@ -6370,10 +6160,10 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82a5ca643c2303ecb740d506539deba189e16f2754040a42901cd8105d0282d0" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2", "proc-macro2-diagnostics", - "quote 1.0.18", - "syn 1.0.91", + "quote", + "syn", ] [[package]] @@ -6391,12 +6181,6 @@ dependencies = [ "base64 0.13.0", ] -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.1.0" @@ -6418,9 +6202,9 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -6477,7 +6261,7 @@ checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" dependencies = [ "cfg-if 1.0.0", "libc", - "log 0.4.14", + "log", "wepoll-ffi", "winapi 0.3.9", ] @@ -6546,10 +6330,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98e9e4b82e0ef281812565ea4751049f1bdcdfccda7d3f459f2e138a40c08678" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", - "version_check 0.9.3", + "proc-macro2", + "quote", + "syn", + "version_check", ] [[package]] @@ -6558,11 +6342,11 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f5444ead4e9935abd7f27dc51f7e852a0569ac888096d5ec2499470794e2e53" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", "syn-mid", - "version_check 0.9.3", + "version_check", ] [[package]] @@ -6571,22 +6355,13 @@ version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - [[package]] name = "proc-macro2" version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" dependencies = [ - "unicode-xid 0.2.2", + "unicode-xid", ] [[package]] @@ -6595,10 +6370,10 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.91", - "version_check 0.9.3", + "proc-macro2", + "quote", + "syn", + "version_check", "yansi", ] @@ -6655,9 +6430,9 @@ checksum = "df35198f0777b75e9ff669737c6da5136b59dba33cf5a010a6d1cc4d56defc6f" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -6681,7 +6456,7 @@ version = "2.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2ef1dc036942fac2470fdb8a911f125404ee9129e9e807f3d12d8589001a38f" dependencies = [ - "log 0.4.14", + "log", "which 4.2.4", ] @@ -6720,22 +6495,13 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - [[package]] name = "quote" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2", ] [[package]] @@ -6744,7 +6510,7 @@ version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" dependencies = [ - "log 0.4.14", + "log", "parking_lot 0.11.2", "scheduled-thread-pool", ] @@ -6950,9 +6716,9 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a043824e29c94169374ac5183ac0ed43f5724dc4556b19568007486bd840fa1f" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.91", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -7011,9 +6777,9 @@ dependencies = [ "ipnet", "js-sys", "lazy_static", - "log 0.4.14", - "mime 0.3.16", - "percent-encoding 2.1.0", + "log", + "mime", + "percent-encoding", "pin-project-lite", "rustls 0.20.2", "rustls-pemfile", @@ -7023,7 +6789,7 @@ dependencies = [ "tokio 1.16.1", "tokio-rustls 0.23.2", "tokio-util", - "url 2.2.2", + "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -7061,27 +6827,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5510dbde48c4c37bf69123b1f636b6dd5f8dffe1f4e358af03c46a4947dca219" -[[package]] -name = "rocket" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7ab1dfdc75bb8bd2be381f37796b1b300c45a3c9145b34d86715e8dd90bf28" -dependencies = [ - "atty", - "base64 0.13.0", - "log 0.4.14", - "memchr", - "num_cpus", - "pear 0.1.4", - "rocket_codegen 0.4.10", - "rocket_http 0.4.10", - "state 0.4.1", - "time 0.1.43", - "toml 0.4.10", - "version_check 0.9.3", - "yansi", -] - [[package]] name = "rocket" version = "0.5.0-rc.1" @@ -7098,7 +6843,7 @@ dependencies = [ "figment", "futures 0.3.21", "indexmap", - "log 0.4.14", + "log", "memchr", "multer", "num_cpus", @@ -7106,33 +6851,18 @@ dependencies = [ "pin-project-lite", "rand 0.8.5", "ref-cast", - "rocket_codegen 0.5.0-rc.1", - "rocket_http 0.5.0-rc.1", + "rocket_codegen", + "rocket_http", "serde", "serde_json", - "state 0.5.3", + "state", "tempfile", "time 0.2.27", "tokio 1.16.1", "tokio-stream", "tokio-util", "ubyte", - "version_check 0.9.3", - "yansi", -] - -[[package]] -name = "rocket_codegen" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729e687d6d2cf434d174da84fb948f7fef4fac22d20ce94ca61c28b72dbcf9f" -dependencies = [ - "devise 0.2.0", - "glob 0.3.0", - "indexmap", - "quote 0.6.13", - "rocket_http 0.4.10", - "version_check 0.9.3", + "version_check", "yansi", ] @@ -7142,44 +6872,14 @@ version = "0.5.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66f5fa462f7eb958bba8710c17c5d774bbbd59809fa76fb1957af7e545aea8bb" dependencies = [ - "devise 0.3.1", + "devise", "glob 0.3.0", "indexmap", - "proc-macro2 1.0.37", - "quote 1.0.18", - "rocket_http 0.5.0-rc.1", - "syn 1.0.91", - "unicode-xid 0.2.2", -] - -[[package]] -name = "rocket_contrib" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b6303dccab46dce6c7ac26c9b9d8d8cde1b19614b027c3f913be6611bff6d9b" -dependencies = [ - "log 0.4.14", - "notify", - "rocket 0.4.10", - "serde", - "serde_json", -] - -[[package]] -name = "rocket_http" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6131e6e6d38a9817f4a494ff5da95971451c2eb56a53915579fc9c80f6ef0117" -dependencies = [ - "cookie 0.11.3", - "hyper 0.10.16", - "indexmap", - "pear 0.1.4", - "percent-encoding 1.0.1", - "smallvec 1.6.1", - "state 0.4.1", - "time 0.1.43", - "unicode-xid 0.1.0", + "proc-macro2", + "quote", + "rocket_http", + "syn", + "unicode-xid", ] [[package]] @@ -7193,18 +6893,18 @@ dependencies = [ "http 0.2.1", "hyper 0.14.16", "indexmap", - "log 0.4.14", + "log", "memchr", - "mime 0.3.16", + "mime", "parking_lot 0.11.2", - "pear 0.2.3", - "percent-encoding 2.1.0", + "pear", + "percent-encoding", "pin-project-lite", "ref-cast", "serde", "smallvec 1.6.1", "stable-pattern", - "state 0.5.3", + "state", "time 0.2.27", "tokio 1.16.1", "uncased", @@ -7232,7 +6932,7 @@ dependencies = [ "hyper 0.12.35", "hyper-rustls 0.17.1", "lazy_static", - "log 0.4.14", + "log", "rusoto_credential", "rusoto_signature", "rustc_version 0.2.3", @@ -7290,9 +6990,9 @@ dependencies = [ "hmac 0.7.1", "http 0.1.21", "hyper 0.12.35", - "log 0.4.14", + "log", "md5", - "percent-encoding 2.1.0", + "percent-encoding", "rusoto_credential", "rustc_version 0.2.3", "serde", @@ -7350,7 +7050,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" dependencies = [ "base64 0.10.1", - "log 0.4.14", + "log", "ring", "sct 0.6.0", "webpki 0.21.2", @@ -7362,7 +7062,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" dependencies = [ - "log 0.4.14", + "log", "ring", "sct 0.7.0", "webpki 0.22.0", @@ -7401,12 +7101,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "same-file" version = "1.0.6" @@ -7584,7 +7278,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91b56c287a5295358bd4a3481a32add1f3fb7131102e300f561f788e33b79efe" dependencies = [ - "log 0.4.14", + "log", "sentry-core", ] @@ -7622,7 +7316,7 @@ dependencies = [ "serde_json", "thiserror", "time 0.3.9", - "url 2.2.2", + "url", "uuid", ] @@ -7669,9 +7363,9 @@ version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -7715,9 +7409,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling", - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -7738,10 +7432,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2881bccd7d60fb32dfa3d7b3136385312f8ad75e2674aab2852867a09790cae8" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.37", - "quote 1.0.18", + "proc-macro2", + "quote", "rustversion", - "syn 1.0.92", + "syn", ] [[package]] @@ -7938,7 +7632,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "906a1a0bc43fed692df4b82a5e2fbfc3733db8dad8bb514ab27a4f23ad04f5c0" dependencies = [ - "log 0.4.14", + "log", "regex", "slog", "slog-async", @@ -7991,7 +7685,7 @@ version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6706b2ace5bbae7291d3f8d2473e2bfab073ccd7d03670946197aec98471fa3e" dependencies = [ - "log 0.4.14", + "log", "slog", "slog-scope", ] @@ -8078,15 +7772,9 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" dependencies = [ - "version_check 0.9.3", + "version_check", ] -[[package]] -name = "state" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" - [[package]] name = "state" version = "0.5.3" @@ -8116,11 +7804,11 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", + "proc-macro2", + "quote", "serde", "serde_derive", - "syn 1.0.91", + "syn", ] [[package]] @@ -8130,13 +7818,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" dependencies = [ "base-x", - "proc-macro2 1.0.37", - "quote 1.0.18", + "proc-macro2", + "quote", "serde", "serde_derive", "serde_json", "sha1", - "syn 1.0.91", + "syn", ] [[package]] @@ -8178,26 +7866,15 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - [[package]] name = "syn" version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "unicode-xid 0.2.2", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] @@ -8206,9 +7883,9 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -8217,10 +7894,10 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", - "unicode-xid 0.2.2", + "proc-macro2", + "quote", + "syn", + "unicode-xid", ] [[package]] @@ -8303,9 +7980,9 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -8334,7 +8011,7 @@ checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e" dependencies = [ "byteorder", "integer-encoding", - "log 0.4.14", + "log", "ordered-float", "threadpool", ] @@ -8360,7 +8037,7 @@ dependencies = [ "standback", "stdweb", "time-macros 0.1.1", - "version_check 0.9.3", + "version_check", "winapi 0.3.9", ] @@ -8399,10 +8076,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.37", - "quote 1.0.18", + "proc-macro2", + "quote", "standback", - "syn 1.0.91", + "syn", ] [[package]] @@ -8552,7 +8229,7 @@ checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" dependencies = [ "bytes 0.4.12", "futures 0.1.29", - "log 0.4.14", + "log", ] [[package]] @@ -8561,9 +8238,9 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.91", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -8576,7 +8253,7 @@ dependencies = [ "futures 0.1.29", "lazy_static", "libc", - "log 0.4.14", + "log", "mio 0.6.22", "mio-named-pipes", "tokio-io", @@ -8594,7 +8271,7 @@ dependencies = [ "crossbeam-utils 0.7.2", "futures 0.1.29", "lazy_static", - "log 0.4.14", + "log", "mio 0.6.22", "num_cpus", "parking_lot 0.9.0", @@ -8692,7 +8369,7 @@ dependencies = [ "crossbeam-utils 0.7.2", "futures 0.1.29", "lazy_static", - "log 0.4.14", + "log", "num_cpus", "slab", "tokio-executor", @@ -8718,7 +8395,7 @@ checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" dependencies = [ "bytes 0.4.12", "futures 0.1.29", - "log 0.4.14", + "log", "mio 0.6.22", "tokio-codec", "tokio-io", @@ -8735,7 +8412,7 @@ dependencies = [ "futures 0.1.29", "iovec", "libc", - "log 0.4.14", + "log", "mio 0.6.22", "mio-uds", "tokio-codec", @@ -8752,20 +8429,11 @@ dependencies = [ "bytes 1.1.0", "futures-core", "futures-sink", - "log 0.4.14", + "log", "pin-project-lite", "tokio 1.16.1", ] -[[package]] -name = "toml" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.5.9" @@ -8788,7 +8456,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" dependencies = [ "cfg-if 1.0.0", - "log 0.4.14", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -8800,9 +8468,9 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -8831,7 +8499,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ "lazy_static", - "log 0.4.14", + "log", "tracing-core", ] @@ -8853,12 +8521,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" - [[package]] name = "treeline" version = "0.1.0" @@ -8871,12 +8533,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" - [[package]] name = "typenum" version = "1.15.0" @@ -8908,16 +8564,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baeed7327e25054889b9bd4f975f32e5f4c5d434042d59ab6cd4142c0a76ed0" dependencies = [ "serde", - "version_check 0.9.3", -] - -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -dependencies = [ - "version_check 0.1.5", + "version_check", ] [[package]] @@ -8944,12 +8591,6 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode-xid" version = "0.2.2" @@ -8972,17 +8613,6 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.2.2" @@ -8990,9 +8620,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ "form_urlencoded", - "idna 0.2.0", + "idna", "matches", - "percent-encoding 2.1.0", + "percent-encoding", "serde", ] @@ -9018,12 +8648,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - [[package]] name = "version_check" version = "0.9.3" @@ -9069,7 +8693,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" dependencies = [ "futures 0.1.29", - "log 0.4.14", + "log", "try-lock", ] @@ -9079,7 +8703,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.14", + "log", "try-lock", ] @@ -9113,10 +8737,10 @@ checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" dependencies = [ "bumpalo", "lazy_static", - "log 0.4.14", - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "log", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-shared", ] @@ -9138,7 +8762,7 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" dependencies = [ - "quote 1.0.18", + "quote", "wasm-bindgen-macro-support", ] @@ -9148,9 +8772,9 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -9366,8 +8990,8 @@ version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81e8f13fef10b63c06356d65d416b070798ddabcadc10d3ece0c5be9b3c7eddb" dependencies = [ - "proc-macro2 1.0.37", - "quote 1.0.18", - "syn 1.0.92", + "proc-macro2", + "quote", + "syn", "synstructure", ] diff --git a/fog/overseer/server/Cargo.toml b/fog/overseer/server/Cargo.toml index 2cae048162..cd9eb3ec13 100644 --- a/fog/overseer/server/Cargo.toml +++ b/fog/overseer/server/Cargo.toml @@ -17,8 +17,7 @@ grpcio = "0.10.2" lazy_static = "1.4" prometheus = "0.13.0" retry = "1.3" -rocket = { version = "0.4.5", default-features = false } -rocket_contrib = { version = "0.4.5", default-features = false, features = ["json"] } +rocket = { version = "0.5.0-rc.1", features = ["json"] } serde = "1" # mc diff --git a/fog/overseer/server/src/bin/main.rs b/fog/overseer/server/src/bin/main.rs index 75dd5d03f8..eabec6e9b4 100644 --- a/fog/overseer/server/src/bin/main.rs +++ b/fog/overseer/server/src/bin/main.rs @@ -12,7 +12,8 @@ use mc_fog_overseer_server::{config::OverseerConfig, server, service::OverseerSe use mc_fog_sql_recovery_db::SqlRecoveryDb; use mc_util_cli::ParserWithBuildInfo; -fn main() { +#[rocket::main] +async fn main() -> Result<(), rocket::Error> { mc_common::setup_panic_handler(); let _sentry_guard = sentry::init(); let config = OverseerConfig::parse(); @@ -36,12 +37,10 @@ fn main() { let overseer_state = server::OverseerState { overseer_service }; - let rocket_config: rocket::Config = - rocket::Config::build(rocket::config::Environment::Development) - .address(config.overseer_listen_host) - .port(config.overseer_listen_port) - .unwrap(); + let rocket_config = rocket::Config::figment() + .merge(("port", config.overseer_listen_port)) + .merge(("address", config.overseer_listen_host.clone())); let rocket = server::initialize_rocket_server(rocket_config, overseer_state); - rocket.launch(); + rocket.launch().await } diff --git a/fog/overseer/server/src/server.rs b/fog/overseer/server/src/server.rs index 78f260b819..aaed981ac8 100644 --- a/fog/overseer/server/src/server.rs +++ b/fog/overseer/server/src/server.rs @@ -10,27 +10,26 @@ use crate::{ }; use mc_fog_recovery_db_iface::RecoveryDb; use mc_fog_sql_recovery_db::SqlRecoveryDb; -use rocket::{get, post, routes}; -use rocket_contrib::json::Json; +use rocket::{get, post, routes, serde::json::Json}; #[post("/enable")] -fn enable(state: rocket::State>) -> Result { +fn enable(state: &rocket::State>) -> Result { state.overseer_service.enable() } #[post("/disable")] -fn disable(state: rocket::State>) -> Result { +fn disable(state: &rocket::State>) -> Result { state.overseer_service.disable() } #[get("/status")] -fn get_status(state: rocket::State>) -> Result { +fn get_status(state: &rocket::State>) -> Result { state.overseer_service.get_status() } #[get("/ingest_summaries")] fn get_ingest_summaries( - state: rocket::State>, + state: &rocket::State>, ) -> Result, String> { state.overseer_service.get_ingest_summaries().map(Json) } @@ -39,7 +38,7 @@ fn get_ingest_summaries( /// /// Meant to be called only by the Prometheus pull mechanism. #[get("/metrics")] -fn get_metrics(state: rocket::State>) -> Result { +fn get_metrics(state: &rocket::State>) -> Result { state.overseer_service.get_metrics() } @@ -56,10 +55,10 @@ where /// Returns an instance of a Rocket server. #[must_use = "Use with a Client or call launch"] -pub fn initialize_rocket_server( - rocket_config: rocket::Config, +pub fn initialize_rocket_server( + rocket_config: T, state: OverseerState, -) -> rocket::Rocket { +) -> rocket::Rocket { rocket::custom(rocket_config) .mount( "/", diff --git a/fog/overseer/server/tests/get_ingest_summaries.rs b/fog/overseer/server/tests/get_ingest_summaries.rs index 0c212ea901..94fef9edac 100644 --- a/fog/overseer/server/tests/get_ingest_summaries.rs +++ b/fog/overseer/server/tests/get_ingest_summaries.rs @@ -9,7 +9,7 @@ use mc_watcher::watcher_db::WatcherDB; use rand_core::SeedableRng; use rand_hc::Hc128Rng; use regex::Regex; -use rocket::local::Client; +use rocket::local::blocking::Client; use std::time::Duration; use tempdir::TempDir; @@ -100,22 +100,19 @@ fn one_active_node_produces_ingest_summaries(logger: Logger) { // Set up the Rocket instance let overseer_state = OverseerState { overseer_service }; // TODO: Consider testing the CLI here instead. - let rocket_config: rocket::Config = - rocket::Config::build(rocket::config::Environment::Development) - // TODO: Make these either passed from CLI or in a Rocket.toml. - .address("127.0.0.1") - .port(PORT_NUMBER) - .unwrap(); + let rocket_config = rocket::Config::figment() + .merge(("port", PORT_NUMBER)) + .merge(("address", "127.0.0.1")); let rocket = server::initialize_rocket_server(rocket_config, overseer_state); - let client = Client::new(rocket).expect("valid rocket instance"); + let client = Client::tracked(rocket).expect("valid rocket instance"); client.post("/enable").dispatch(); // Give overseer time to perform its logic. std::thread::sleep(Duration::from_secs(10)); - let mut response = client.get("/ingest_summaries").dispatch(); + let response = client.get("/ingest_summaries").dispatch(); - let body = response.body_string().unwrap(); + let body = response.into_string().unwrap(); let active_pattern = Regex::new("ACTIVE").unwrap(); active_pattern.captures(&body); diff --git a/fog/overseer/server/tests/inactive_outstanding_key_idle_does_not_have_key.rs b/fog/overseer/server/tests/inactive_outstanding_key_idle_does_not_have_key.rs index 2605f16add..be1246ca5c 100644 --- a/fog/overseer/server/tests/inactive_outstanding_key_idle_does_not_have_key.rs +++ b/fog/overseer/server/tests/inactive_outstanding_key_idle_does_not_have_key.rs @@ -10,7 +10,7 @@ use mc_transaction_core::{Block, BlockContents}; use mc_watcher::watcher_db::WatcherDB; use rand_core::SeedableRng; use rand_hc::Hc128Rng; -use rocket::local::Client; +use rocket::local::blocking::Client; use std::{convert::TryFrom, str::FromStr, time::Duration}; use tempdir::TempDir; use url::Url; @@ -116,14 +116,11 @@ fn inactive_oustanding_key_idle_node_does_not_have_key_idle_node_is_activated_an // Set up the Rocket instance let overseer_state = OverseerState { overseer_service }; // TODO: Consider testing the CLI here instead. - let rocket_config: rocket::Config = - rocket::Config::build(rocket::config::Environment::Development) - // TODO: Make these either passed from CLI or in a Rocket.toml. - .address("127.0.0.1") - .port(PORT_NUMBER) - .unwrap(); + let rocket_config = rocket::Config::figment() + .merge(("port", PORT_NUMBER)) + .merge(("address", "127.0.0.1")); let rocket = server::initialize_rocket_server(rocket_config, overseer_state); - let client = Client::new(rocket).expect("valid rocket instance"); + let client = Client::tracked(rocket).expect("valid rocket instance"); client.post("/enable").dispatch(); // Add 11 test blocks. diff --git a/fog/overseer/server/tests/inactive_outstanding_key_idle_has_key.rs b/fog/overseer/server/tests/inactive_outstanding_key_idle_has_key.rs index 2d46ce48b4..f630414c4b 100644 --- a/fog/overseer/server/tests/inactive_outstanding_key_idle_has_key.rs +++ b/fog/overseer/server/tests/inactive_outstanding_key_idle_has_key.rs @@ -10,7 +10,7 @@ use mc_transaction_core::{Block, BlockContents}; use mc_watcher::watcher_db::WatcherDB; use rand_core::SeedableRng; use rand_hc::Hc128Rng; -use rocket::local::Client; +use rocket::local::blocking::Client; use std::{convert::TryFrom, str::FromStr, time::Duration}; use tempdir::TempDir; use url::Url; @@ -123,14 +123,11 @@ fn inactive_oustanding_key_idle_node_has_original_key_node_is_activated_and_key_ // Set up the Rocket instance let overseer_state = OverseerState { overseer_service }; // TODO: Consider testng the CLI here instead - let rocket_config: rocket::Config = - rocket::Config::build(rocket::config::Environment::Development) - // TODO: Make these either passed from CLI or in a Rocket.toml. - .address("127.0.0.1") - .port(PORT_NUMBER) - .unwrap(); + let rocket_config = rocket::Config::figment() + .merge(("port", PORT_NUMBER)) + .merge(("address", "127.0.0.1")); let rocket = server::initialize_rocket_server(rocket_config, overseer_state); - let client = Client::new(rocket).expect("valid rocket instance"); + let client = Client::tracked(rocket).expect("valid rocket instance"); client.post("/enable").dispatch(); // Add 11 test blocks. diff --git a/fog/overseer/server/tests/one_active_node.rs b/fog/overseer/server/tests/one_active_node.rs index 82266e0e9e..2a39a7f887 100644 --- a/fog/overseer/server/tests/one_active_node.rs +++ b/fog/overseer/server/tests/one_active_node.rs @@ -7,7 +7,7 @@ use mc_fog_recovery_db_iface::RecoveryDb; use mc_fog_sql_recovery_db::test_utils::SqlRecoveryDbTestContext; use mc_ledger_db::LedgerDB; use mc_watcher::watcher_db::WatcherDB; -use rocket::local::Client; +use rocket::local::blocking::Client; use std::{convert::TryFrom, str::FromStr, time::Duration}; use tempdir::TempDir; use url::Url; @@ -92,12 +92,9 @@ fn one_active_node_cluster_state_does_not_change(logger: Logger) { // Consider testing the CLI here instead // Initialize an OverSeerService object... - let rocket_config: rocket::Config = - rocket::Config::build(rocket::config::Environment::Development) - // TODO: Make these either passed from CLI or in a Rocket.toml. - .address("127.0.0.1") - .port(PORT_NUMBER) - .unwrap(); + let rocket_config = rocket::Config::figment() + .merge(("port", PORT_NUMBER)) + .merge(("address", "127.0.0.1")); let mut overseer_service = OverseerService::new( vec![client_listen_uri0, client_listen_uri1, client_listen_uri2], @@ -107,7 +104,7 @@ fn one_active_node_cluster_state_does_not_change(logger: Logger) { overseer_service.start().unwrap(); let overseer_state = OverseerState { overseer_service }; let rocket = server::initialize_rocket_server(rocket_config, overseer_state); - let client = Client::new(rocket).expect("valid rocket instance"); + let client = Client::tracked(rocket).expect("valid rocket instance"); let _req = client.post("/enable").dispatch(); // Give Overseer time to perform logic diff --git a/fog/overseer/server/tests/prometheus_produces_metrics.rs b/fog/overseer/server/tests/prometheus_produces_metrics.rs index 38010d5c2f..4bf19c9a32 100644 --- a/fog/overseer/server/tests/prometheus_produces_metrics.rs +++ b/fog/overseer/server/tests/prometheus_produces_metrics.rs @@ -9,7 +9,7 @@ use mc_watcher::watcher_db::WatcherDB; use rand_core::SeedableRng; use rand_hc::Hc128Rng; use regex::Regex; -use rocket::local::Client; +use rocket::local::blocking::Client; use std::time::Duration; use tempdir::TempDir; @@ -104,22 +104,19 @@ fn one_active_node_idle_nodes_different_keys_produces_prometheus_metrics(logger: // Set up the Rocket instance let overseer_state = OverseerState { overseer_service }; // TODO: Consider testing the CLI here instead. - let rocket_config: rocket::Config = - rocket::Config::build(rocket::config::Environment::Development) - // TODO: Make these either passed from CLI or in a Rocket.toml. - .address("127.0.0.1") - .port(PORT_NUMBER) - .unwrap(); + let rocket_config = rocket::Config::figment() + .merge(("port", PORT_NUMBER)) + .merge(("address", "127.0.0.1")); let rocket = server::initialize_rocket_server(rocket_config, overseer_state); - let client = Client::new(rocket).expect("valid rocket instance"); + let client = Client::tracked(rocket).expect("valid rocket instance"); client.post("/enable").dispatch(); // Give overseer time to perform its logic. std::thread::sleep(Duration::from_secs(10)); - let mut response = client.get("/metrics").dispatch(); + let response = client.get("/metrics").dispatch(); - let body = response.body_string().unwrap(); + let body = response.into_string().unwrap(); let correct_active_node_count = Regex::new(r#"active_node_count"} 1"#).unwrap(); assert!(correct_active_node_count.is_match(&body)); diff --git a/fog/overseer/server/tests/retired_key_not_outstanding_idles_have_different_keys.rs b/fog/overseer/server/tests/retired_key_not_outstanding_idles_have_different_keys.rs index 1d73159891..9bf300066e 100644 --- a/fog/overseer/server/tests/retired_key_not_outstanding_idles_have_different_keys.rs +++ b/fog/overseer/server/tests/retired_key_not_outstanding_idles_have_different_keys.rs @@ -10,7 +10,7 @@ use mc_transaction_core::{Block, BlockContents}; use mc_watcher::watcher_db::WatcherDB; use rand_core::SeedableRng; use rand_hc::Hc128Rng; -use rocket::local::Client; +use rocket::local::blocking::Client; use std::{convert::TryFrom, str::FromStr, time::Duration}; use tempdir::TempDir; use url::Url; @@ -123,14 +123,11 @@ fn active_key_is_retired_not_outstanding_idle_nodes_have_different_keys_new_key_ // Set up the Rocket instance let overseer_state = OverseerState { overseer_service }; // Consider testng the CLI here instead - let rocket_config: rocket::Config = - rocket::Config::build(rocket::config::Environment::Development) - // TODO: Make these either passed from CLI or in a Rocket.toml. - .address("127.0.0.1") - .port(PORT_NUMBER) - .unwrap(); + let rocket_config = rocket::Config::figment() + .merge(("port", PORT_NUMBER)) + .merge(("address", "127.0.0.1")); let rocket = server::initialize_rocket_server(rocket_config, overseer_state); - let client = Client::new(rocket).expect("valid rocket instance"); + let client = Client::tracked(rocket).expect("valid rocket instance"); let _req = client.post("/enable").dispatch(); // Retire the current active node. diff --git a/fog/overseer/server/tests/retired_key_not_outstanding_idles_have_same_key.rs b/fog/overseer/server/tests/retired_key_not_outstanding_idles_have_same_key.rs index 43f2f4ef01..395b153bf4 100644 --- a/fog/overseer/server/tests/retired_key_not_outstanding_idles_have_same_key.rs +++ b/fog/overseer/server/tests/retired_key_not_outstanding_idles_have_same_key.rs @@ -10,7 +10,7 @@ use mc_transaction_core::{Block, BlockContents}; use mc_watcher::watcher_db::WatcherDB; use rand_core::SeedableRng; use rand_hc::Hc128Rng; -use rocket::local::Client; +use rocket::local::blocking::Client; use std::{convert::TryFrom, str::FromStr, time::Duration}; use tempdir::TempDir; use url::Url; @@ -114,13 +114,9 @@ fn active_key_is_retired_not_outstanding_new_key_is_set_node_activated(logger: L // Consider testing the CLI here instead. Initialize an OverSeerService // object... - let rocket_config: rocket::Config = - rocket::Config::build(rocket::config::Environment::Development) - // TODO: Make these either passed from CLI or in a Rocket.toml. - .address("127.0.0.1") - .port(PORT_NUMBER) - .unwrap(); - + let rocket_config = rocket::Config::figment() + .merge(("port", PORT_NUMBER)) + .merge(("address", "127.0.0.1")); let mut overseer_service = OverseerService::new( vec![client_listen_uri0, client_listen_uri1, client_listen_uri2], recovery_db.clone(), @@ -129,7 +125,7 @@ fn active_key_is_retired_not_outstanding_new_key_is_set_node_activated(logger: L overseer_service.start().unwrap(); let overseer_state = OverseerState { overseer_service }; let rocket = server::initialize_rocket_server(rocket_config, overseer_state); - let client = Client::new(rocket).expect("valid rocket instance"); + let client = Client::tracked(rocket).expect("valid rocket instance"); let _req = client.post("/enable").dispatch(); // Retire the current active node.