From 73137ede21a42fe753432fc0d1e4ab1a71adb4e0 Mon Sep 17 00:00:00 2001 From: "Aode (Lion)" Date: Sat, 26 Feb 2022 12:22:30 -0600 Subject: [PATCH] Release candidate 1 --- .cargo/config | 2 +- Cargo.lock | 519 ++++++++++++++++++++++++++++---------------------- Cargo.toml | 16 +- README.md | 8 +- src/config.rs | 23 ++- 5 files changed, 313 insertions(+), 255 deletions(-) diff --git a/.cargo/config b/.cargo/config index 5dbf2c8..bff29e6 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,2 +1,2 @@ [build] -# rustflags = ["--cfg", "tokio_unstable"] +rustflags = ["--cfg", "tokio_unstable"] diff --git a/Cargo.lock b/Cargo.lock index 08083d0..9f71b48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "actix-codec" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a36c014a3e811624313b51a227b775ecba55d36ef9462bbaac7d4f13e54c9271" +checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" dependencies = [ "bitflags", "bytes", @@ -16,7 +16,7 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "tokio-util", + "tokio-util 0.7.0", ] [[package]] @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.0.0-rc.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0185d65352deeea60d92231708068c04dc64f1ab307a1a307206a47d5a45d3" +checksum = "0f3fdd63b9cfeaf92eeeece719dabbddddb420a57d3fd171ce1490ecfb7086b1" dependencies = [ "actix-codec", "actix-rt", @@ -65,7 +65,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rand", - "sha-1", + "sha-1 0.10.0", "smallvec", ] @@ -81,9 +81,9 @@ dependencies = [ [[package]] name = "actix-multipart" -version = "0.4.0-beta.13" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59b1f14a8b2bc14df9be544d173f5390da5b62d531e406fd0f0ce9b825fea5a" +checksum = "c9edfb0e7663d7fe18c8d5b668c9c1bcf79176b1dcc9d4da9592503209a6bfb0" dependencies = [ "actix-utils", "actix-web", @@ -99,16 +99,16 @@ dependencies = [ [[package]] name = "actix-router" -version = "0.5.0-rc.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6506dbef336634ff35d994d58daa0a412ea23751f15f9b4dcac4d594b1ed1f" +checksum = "eb60846b52c118f2f04a56cc90880a274271c489b2498623d58176f8ca21fa80" dependencies = [ "bytestring", "firestorm", "http", "log", "regex", - "serde 1.0.136", + "serde", ] [[package]] @@ -135,7 +135,7 @@ dependencies = [ "futures-core", "futures-util", "log", - "mio 0.8.0", + "mio", "num_cpus", "socket2", "tokio", @@ -155,9 +155,9 @@ dependencies = [ [[package]] name = "actix-tls" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31ab31563b611fa822480b4255e8750cf0af9ce1b8b7bde298afe8447ef9333" +checksum = "9fde0cf292f7cdc7f070803cb9a0d45c018441321a78b1042ffbbb81ec333297" dependencies = [ "actix-codec", "actix-rt", @@ -168,7 +168,7 @@ dependencies = [ "log", "pin-project-lite", "tokio-rustls", - "tokio-util", + "tokio-util 0.7.0", "webpki-roots", ] @@ -184,9 +184,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.0.0-rc.3" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e3c85bc4116b69913b03f16cff8cade1212508fcd321847d9cfe3d3e41f991" +checksum = "f4e5ebffd51d50df56a3ae0de0e59487340ca456f05dd0b90c0a7a6dd6a74d31" dependencies = [ "actix-codec", "actix-http", @@ -197,6 +197,7 @@ dependencies = [ "actix-utils", "ahash 0.7.6", "bytes", + "bytestring", "cfg-if", "derive_more", "encoding_rs", @@ -209,12 +210,12 @@ dependencies = [ "once_cell", "pin-project-lite", "regex", - "serde 1.0.136", + "serde", "serde_json", "serde_urlencoded", "smallvec", "socket2", - "time 0.3.7", + "time", "url", ] @@ -261,15 +262,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.53" +version = "1.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd" [[package]] name = "async-stream" @@ -322,9 +317,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "awc" -version = "3.0.0-beta.20" +version = "3.0.0-beta.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a64a95bbf4905fd057ea45b70fdfeeb9c7ae09f03f091642c4e66a16ebb3ad5" +checksum = "d91ad5074d7d2d8be6ef74d4ecb79c0f4d5f58bdc7ec896d5fbaa9f2fb9bfa5e" dependencies = [ "actix-codec", "actix-http", @@ -348,7 +343,7 @@ dependencies = [ "pin-project-lite", "rand", "rustls", - "serde 1.0.136", + "serde", "serde_json", "serde_urlencoded", "tokio", @@ -357,12 +352,12 @@ dependencies = [ [[package]] name = "aws-creds" version = "0.27.1" -source = "git+https://github.com/asonix/rust-s3?branch=asonix/generic-client#c91e4ecacc8c5a351ff360df68a3cb00863b62bd" +source = "git+https://github.com/asonix/rust-s3?branch=asonix/generic-client#09e6d50799650490db5bd5b97e860e9222e11fa8" dependencies = [ "anyhow", "dirs", - "rust-ini 0.17.0", - "serde 1.0.136", + "rust-ini", + "serde", "serde-xml-rs", "serde_derive", "url", @@ -370,9 +365,9 @@ dependencies = [ [[package]] name = "aws-region" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e37c2dc2c9047311911ef175e0ffbb3853f17c32b72cf3d562f455e5ff77267" +checksum = "10110ddbd800fb47e6bef95e88fc13495795d252f585272a4fa3ac4f5b2e0a4d" dependencies = [ "anyhow", ] @@ -389,13 +384,25 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + [[package]] name = "block-buffer" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array", + "generic-array 0.14.5", ] [[package]] @@ -404,7 +411,16 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ - "generic-array", + "generic-array 0.14.5", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", ] [[package]] @@ -413,6 +429,12 @@ version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + [[package]] name = "byteorder" version = "1.4.3" @@ -436,9 +458,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -446,19 +468,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits 0.2.14", - "time 0.1.43", - "winapi", -] - [[package]] name = "clap" version = "2.34.0" @@ -476,15 +485,18 @@ dependencies = [ [[package]] name = "config" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1b9d958c2b1368a663f05538fc1b5975adce1e19f435acceae987aceeeb369" +checksum = "54ad70579325f1a38ea4c13412b82241c5900700a69785d73e2736bd65a33f86" dependencies = [ + "async-trait", + "json5", "lazy_static", - "nom 5.1.2", - "rust-ini 0.13.0", - "serde 1.0.136", - "serde-hjson", + "nom", + "pathdiff", + "ron", + "rust-ini", + "serde", "serde_json", "toml", "yaml-rust", @@ -505,16 +517,18 @@ dependencies = [ [[package]] name = "console-subscriber" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a4aa62cefeef6d5a2bfcf638818b7950329a6c3ad919f89f04d60174f217f4" +checksum = "565a7dfea2d10dd0e5c57cc394d5d441b1910960d8c9211ed14135e0e6ec3a20" dependencies = [ "console-api", "crossbeam-channel", + "crossbeam-utils", "futures", "hdrhistogram", "humantime", - "serde 1.0.136", + "prost-types", + "serde", "serde_json", "thread_local", "tokio", @@ -584,11 +598,12 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4600d695eb3f6ce1cd44e6e291adceb2cc3ab12f20a33777ecd0bf6eba34e06" +checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" dependencies = [ - "generic-array", + "generic-array 0.14.5", + "typenum", ] [[package]] @@ -597,7 +612,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array", + "generic-array 0.14.5", "subtle", ] @@ -627,18 +642,27 @@ dependencies = [ [[package]] name = "digest" -version = "0.9.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array", + "generic-array 0.12.4", ] [[package]] name = "digest" -version = "0.10.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb780dce4f9a8f5c087362b3a4595936b2019e7c8b30f2c3e9a7e94e6ae9837" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.5", +] + +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ "block-buffer 0.10.2", "crypto-common", @@ -688,6 +712,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + [[package]] name = "fastrand" version = "1.7.0" @@ -844,6 +874,15 @@ dependencies = [ "byteorder", ] +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + [[package]] name = "generic-array" version = "0.14.5" @@ -856,9 +895,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" +checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" dependencies = [ "cfg-if", "libc", @@ -880,7 +919,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util", + "tokio-util 0.6.9", "tracing", ] @@ -901,15 +940,15 @@ checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" [[package]] name = "hdrhistogram" -version = "7.4.0" +version = "7.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6490be71f07a5f62b564bc58e36953f675833df11c7e4a0647bee7a07ca1ec5e" +checksum = "31672b7011be2c4f7456c4ddbcb40e7e9a4a9fad8efe49a6ebaf5f307d0109c0" dependencies = [ "base64", "byteorder", "flate2", - "nom 7.1.0", - "num-traits 0.2.14", + "nom", + "num-traits", ] [[package]] @@ -1105,6 +1144,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "json5" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" +dependencies = [ + "pest", + "pest_derive", + "serde", +] + [[package]] name = "language-tags" version = "0.3.2" @@ -1117,24 +1167,11 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec", - "bitflags", - "cfg-if", - "ryu", - "static_assertions", -] - [[package]] name = "libc" -version = "0.2.117" +version = "0.2.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c" +checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" [[package]] name = "linked-hash-map" @@ -1178,6 +1215,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "matchers" version = "0.1.0" @@ -1247,19 +1290,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "mio" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" -dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "winapi", -] - [[package]] name = "mio" version = "0.8.0" @@ -1288,17 +1318,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" -[[package]] -name = "nom" -version = "5.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" -dependencies = [ - "lexical-core", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.0" @@ -1319,25 +1338,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits 0.2.14", -] - -[[package]] -name = "num-traits" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" -dependencies = [ - "num-traits 0.2.14", -] - [[package]] name = "num-traits" version = "0.2.14" @@ -1372,6 +1372,12 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + [[package]] name = "opaque-debug" version = "0.3.0" @@ -1481,12 +1487,61 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + [[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pest_meta" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" +dependencies = [ + "maplit", + "pest", + "sha-1 0.8.2", +] + [[package]] name = "petgraph" version = "0.6.0" @@ -1499,7 +1554,7 @@ dependencies = [ [[package]] name = "pict-rs" -version = "0.3.0-beta.20" +version = "0.3.0-rc.1" dependencies = [ "actix-form-data", "actix-rt", @@ -1521,17 +1576,17 @@ dependencies = [ "pin-project-lite", "reqwest", "rust-s3", - "serde 1.0.136", + "serde", "serde_json", - "sha2 0.10.1", + "sha2 0.10.2", "sled", "storage-path-generator", "structopt", "thiserror", - "time 0.3.7", + "time", "tokio", "tokio-uring", - "tokio-util", + "tokio-util 0.6.9", "tracing", "tracing-actix-web", "tracing-awc", @@ -1679,14 +1734,13 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", "rand_core", - "rand_hc", ] [[package]] @@ -1708,15 +1762,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core", -] - [[package]] name = "redox_syscall" version = "0.2.10" @@ -1796,12 +1841,12 @@ dependencies = [ "pin-project-lite", "rustls", "rustls-pemfile", - "serde 1.0.136", + "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-rustls", - "tokio-util", + "tokio-util 0.6.9", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -1835,10 +1880,15 @@ dependencies = [ ] [[package]] -name = "rust-ini" -version = "0.13.0" +name = "ron" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" +checksum = "1b861ecaade43ac97886a512b360d01d66be9f41f3c61088b42cedf92e03d678" +dependencies = [ + "base64", + "bitflags", + "serde", +] [[package]] name = "rust-ini" @@ -1852,8 +1902,8 @@ dependencies = [ [[package]] name = "rust-s3" -version = "0.28.0" -source = "git+https://github.com/asonix/rust-s3?branch=asonix/generic-client#c91e4ecacc8c5a351ff360df68a3cb00863b62bd" +version = "0.29.0" +source = "git+https://github.com/asonix/rust-s3?branch=asonix/generic-client#09e6d50799650490db5bd5b97e860e9222e11fa8" dependencies = [ "anyhow", "async-trait", @@ -1861,7 +1911,6 @@ dependencies = [ "aws-region", "base64", "cfg-if", - "chrono", "hex", "hmac", "http", @@ -1870,10 +1919,11 @@ dependencies = [ "md5", "percent-encoding", "reqwest", - "serde 1.0.136", + "serde", "serde-xml-rs", "serde_derive", "sha2 0.9.9", + "time", "tokio", "tokio-stream", "url", @@ -1890,9 +1940,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.2" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" +checksum = "4fbfeb8d0ddb84706bc597a5574ab8912817c52a397f819e5b614e2265206921" dependencies = [ "log", "ring", @@ -1939,15 +1989,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0486718e92ec9a68fbed73bb5ef687d71103b142595b406835649bebd33f72c7" - -[[package]] -name = "serde" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" +checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" [[package]] name = "serde" @@ -1958,18 +2002,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-hjson" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3a4e0ea8a88553209f6cc6cfe8724ecad22e1acf372793c27d995290fe74f8" -dependencies = [ - "lazy_static", - "num-traits 0.1.43", - "regex", - "serde 0.8.23", -] - [[package]] name = "serde-xml-rs" version = "0.5.1" @@ -1977,7 +2009,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65162e9059be2f6a3421ebbb4fef3e74b7d9e7c60c50a0e292c6239f19f1edfa" dependencies = [ "log", - "serde 1.0.136", + "serde", "thiserror", "xml-rs", ] @@ -1995,13 +2027,13 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085" +checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ "itoa", "ryu", - "serde 1.0.136", + "serde", ] [[package]] @@ -2013,7 +2045,19 @@ dependencies = [ "form_urlencoded", "itoa", "ryu", - "serde 1.0.136", + "serde", +] + +[[package]] +name = "sha-1" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", ] [[package]] @@ -2024,7 +2068,7 @@ checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.2", + "digest 0.10.3", ] [[package]] @@ -2037,18 +2081,18 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug", + "opaque-debug 0.3.0", ] [[package]] name = "sha2" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99c3bd8169c58782adad9290a9af5939994036b76187f7b4f0e6de91dbbfc0ec" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.2", + "digest 0.10.3", ] [[package]] @@ -2114,12 +2158,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "storage-path-generator" version = "0.1.0" @@ -2228,16 +2266,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "time" version = "0.3.7" @@ -2247,9 +2275,16 @@ dependencies = [ "itoa", "libc", "num_threads", - "serde 1.0.136", + "serde", + "time-macros", ] +[[package]] +name = "time-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25eb0ca3468fc0acc11828786797f6ef9aa1555e4a211a60d64cc8e4d1be47d6" + [[package]] name = "tinyvec" version = "1.5.1" @@ -2267,19 +2302,20 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.16.1" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a" +checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" dependencies = [ "bytes", "libc", "memchr", - "mio 0.7.14", + "mio", "num_cpus", "once_cell", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "pin-project-lite", "signal-hook-registry", + "socket2", "tokio-macros", "tracing", "winapi", @@ -2356,13 +2392,27 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-util" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64910e1b9c1901aaf5375561e35b9c057d95ff41a44ede043a03e09279eabaf1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ - "serde 1.0.136", + "serde", ] [[package]] @@ -2388,7 +2438,7 @@ dependencies = [ "prost-derive", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.6.9", "tower", "tower-layer", "tower-service", @@ -2410,9 +2460,9 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5651b5f6860a99bd1adb59dbfe1db8beb433e73709d9032b413a77e2fb7c066a" +checksum = "9a89fd63ad6adf737582df5db40d286574513c69a11dac5214dc3b5603d6713e" dependencies = [ "futures-core", "futures-util", @@ -2422,8 +2472,7 @@ dependencies = [ "rand", "slab", "tokio", - "tokio-stream", - "tokio-util", + "tokio-util 0.7.0", "tower-layer", "tower-service", "tracing", @@ -2443,9 +2492,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d8d93354fe2a8e50d5953f5ae2e47a3fc2ef03292e7ea46e3cc38f549525fb9" +checksum = "f6c650a8ef0cd2dd93736f033d21cbd1224c5a967aa0c258d00fcf7dafef9b9f" dependencies = [ "cfg-if", "log", @@ -2456,9 +2505,9 @@ dependencies = [ [[package]] name = "tracing-actix-web" -version = "0.5.0-rc.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7890da8dde042f5248aeab89e3de570039ad5ecc9dbe492bf3222355e102086" +checksum = "245a559f6fafd06e8f4cf7731c408a78623585a737467927b54c1c9813db3774" dependencies = [ "actix-web", "opentelemetry", @@ -2482,9 +2531,9 @@ dependencies = [ [[package]] name = "tracing-awc" -version = "0.1.0-beta.23" +version = "0.1.0-beta.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf6111218164a416870a282e3cb2ec13071de9f8fb49776b0f4d8bd95454aabd" +checksum = "8f5a615bd1950747052e9cc354ef0b3823e571b67e83ed43371ea147a1d07059" dependencies = [ "actix-http", "actix-service", @@ -2540,9 +2589,9 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.17.0" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff3ebfa73490b6d574ca747819b6bde3e8d006b58861f34cafa89898d91eb9c" +checksum = "1f9378e96a9361190ae297e7f3a8ff644aacd2897f244b1ff81f381669196fa6" dependencies = [ "opentelemetry", "tracing", @@ -2553,9 +2602,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74786ce43333fcf51efe947aed9718fbe46d5c7328ec3f1029e818083966d9aa" +checksum = "9e0ab7bdc962035a87fba73f3acca9b8a8d0034c2e6f60b84aeaaddddc155dce" dependencies = [ "ansi_term", "lazy_static", @@ -2591,6 +2640,12 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + [[package]] name = "unchecked-index" version = "0.2.2" @@ -2646,7 +2701,7 @@ dependencies = [ "idna", "matches", "percent-encoding", - "serde 1.0.136", + "serde", ] [[package]] @@ -2656,7 +2711,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ "getrandom", - "serde 1.0.136", + "serde", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 464e1c5..dd79ff7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pict-rs" description = "A simple image hosting service" -version = "0.3.0-beta.20" +version = "0.3.0-rc.1" authors = ["asonix "] license = "AGPL-3.0" readme = "README.md" @@ -11,7 +11,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] console = ["console-subscriber"] -default = ["object-storage"] +default = ["object-storage", "console"] object-storage = ["reqwest", "rust-s3"] io-uring = [ "actix-rt/io-uring", @@ -24,14 +24,14 @@ io-uring = [ actix-form-data = "0.6.0-beta.11" actix-rt = { version = "2.6.0", default-features = false } actix-server = "2.0.0" -actix-web = { version = "4.0.0-rc.3", default-features = false } +actix-web = { version = "4.0.0", default-features = false } anyhow = "1.0" async-trait = "0.1.51" -awc = { version = "3.0.0-beta.20", default-features = false, features = [ +awc = { version = "3.0.0-beta.21", default-features = false, features = [ "rustls", ] } base64 = "0.13.0" -config = "0.11.0" +config = "0.12.0" console-subscriber = { version = "0.1", optional = true } dashmap = "5.1.0" futures-util = "0.3.17" @@ -45,7 +45,7 @@ reqwest = { version = "0.11.5", default-features = false, features = [ "rustls-tls", "stream", ], optional = true } -rust-s3 = { version = "0.28.0", default-features = false, features = [ +rust-s3 = { version = "0.29.0", default-features = false, features = [ "fail-on-err", "with-reqwest", ], optional = true, git = "https://github.com/asonix/rust-s3", branch = "asonix/generic-client" } @@ -74,11 +74,11 @@ url = { version = "2.2", features = ["serde"] } uuid = { version = "0.8.2", features = ["v4", "serde"] } [dependencies.tracing-actix-web] -version = "0.5.0-rc.3" +version = "0.5.0" default-features = false features = ["emit_event_on_error", "opentelemetry_0_17"] [dependencies.tracing-awc] -version = "0.1.0-beta.23" +version = "0.1.0-beta.24" default-features = false features = ["emit_event_on_error", "opentelemetry_0_17"] diff --git a/README.md b/README.md index 04a66c4..5a7bad9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ _a simple image hosting service_ ## Usage ### Running ``` -pict-rs 0.3.0-alpha.43 +pict-rs 0.3.0-rc.1 USAGE: pict-rs [FLAGS] [OPTIONS] [SUBCOMMAND] @@ -46,7 +46,7 @@ SUBCOMMANDS: ``` ``` -pict-rs-file-store 0.3.0-alpha.43 +pict-rs-file-store 0.3.0-rc.1 USAGE: pict-rs file-store [OPTIONS] @@ -60,7 +60,7 @@ OPTIONS: ``` ``` -pict-rs-s3-store 0.3.0-alpha.43 +pict-rs-s3-store 0.3.0-rc.1 USAGE: pict-rs s3-store [OPTIONS] --bucket-name --region @@ -75,7 +75,7 @@ OPTIONS: --region Region in which the bucket exists, can be an http endpoint --secret-key --security-token - --session-token + --session-token ``` See [`pict-rs.toml`](https://git.asonix.dog/asonix/pict-rs/src/branch/main/pict-rs.toml) and diff --git a/src/config.rs b/src/config.rs index affeb2d..4ece53e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -217,30 +217,33 @@ impl Defaults { impl Config { pub(crate) fn build() -> anyhow::Result { let args = Args::from_args(); - let mut base_config = config::Config::new(); - base_config.merge(config::Config::try_from(&Defaults::new())?)?; if let Some(path) = args.migrate_file { - let mut migrate_config = config::Config::new(); - migrate_config.merge(config::File::from(path))?; - let migrate: Migrate = migrate_config.try_into()?; + let migrate_config = config::Config::builder() + .add_source(config::File::from(path)) + .build()?; + let migrate: Migrate = migrate_config.try_deserialize()?; crate::MIGRATE.set(migrate).unwrap(); } + let mut base_config = + config::Config::builder().add_source(config::Config::try_from(&Defaults::new())?); + if let Some(path) = args.config_file { - base_config.merge(config::File::from(path))?; + base_config = base_config.add_source(config::File::from(path)); }; if !args.overrides.is_default() { let merging = config::Config::try_from(&args.overrides)?; - base_config.merge(merging)?; + base_config = base_config.add_source(merging); } - base_config.merge(config::Environment::with_prefix("PICTRS").separator("__"))?; - - let config: Self = base_config.try_into()?; + let config: Self = base_config + .add_source(config::Environment::with_prefix("PICTRS").separator("__")) + .build()? + .try_deserialize()?; Ok(config) }