From 2abfe6f0cf4cdc5c4b1e74d6799b961f08985e5a Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Thu, 9 Nov 2023 16:37:31 -0500 Subject: [PATCH] Replace async-std with tokio. Forgot to transition this when we replaced tide with RPC. --- deepwell/Cargo.lock | 665 ++---------------------- deepwell/Cargo.toml | 7 +- deepwell/src/locales/fluent.rs | 11 +- deepwell/src/services/password.rs | 4 +- deepwell/src/services/render/service.rs | 2 +- 5 files changed, 64 insertions(+), 625 deletions(-) diff --git a/deepwell/Cargo.lock b/deepwell/Cargo.lock index 05f46f16c5..ffc705e031 100644 --- a/deepwell/Cargo.lock +++ b/deepwell/Cargo.lock @@ -17,60 +17,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher", -] - -[[package]] -name = "aes-gcm" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher", - "opaque-debug", -] - [[package]] name = "ahash" version = "0.7.7" @@ -212,28 +158,12 @@ dependencies = [ "typenum", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "ascii" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" -[[package]] -name = "async-attributes" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "async-channel" version = "1.9.0" @@ -258,16 +188,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-dup" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7427a12b8dc09291528cfb1da2447059adb4a257388c2acd6497a79d55cf6f7c" -dependencies = [ - "futures-io", - "simple-mutex", -] - [[package]] name = "async-executor" version = "1.6.0" @@ -297,23 +217,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "async-h1" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1d1dae8cb2c4258a79d6ed088b7fb9b4763bf4e9b22d040779761e046a2971" -dependencies = [ - "async-channel 1.9.0", - "async-dup", - "async-global-executor", - "async-io", - "futures-lite 1.13.0", - "http-types", - "httparse", - "log", - "pin-project", -] - [[package]] name = "async-io" version = "1.13.0" @@ -360,7 +263,6 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ - "async-attributes", "async-channel 1.9.0", "async-global-executor", "async-io", @@ -409,19 +311,6 @@ version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" -[[package]] -name = "async-tls" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85a97c4a0ecce878efd3f945f119c78a646d8975340bca0398f9bb05c30cc52" -dependencies = [ - "futures-core", - "futures-io", - "rustls 0.18.1", - "webpki", - "webpki-roots 0.20.0", -] - [[package]] name = "async-trait" version = "0.1.74" @@ -465,7 +354,7 @@ dependencies = [ "serde", "serde-xml-rs", "thiserror", - "time 0.3.30", + "time", "url", ] @@ -493,18 +382,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - [[package]] name = "base64" version = "0.13.1" @@ -703,15 +580,6 @@ dependencies = [ "windows-targets", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - [[package]] name = "clap" version = "4.4.8" @@ -778,17 +646,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "config" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b076e143e1d9538dde65da30f8481c2a6c44040edb8e02b9bf1351edb92ce3" -dependencies = [ - "lazy_static", - "nom 5.1.3", - "serde", -] - [[package]] name = "const-oid" version = "0.9.5" @@ -815,35 +672,12 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "cookie" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" -dependencies = [ - "aes-gcm", - "base64 0.13.1", - "hkdf 0.10.0", - "hmac 0.10.1", - "percent-encoding", - "rand 0.8.5", - "sha2 0.9.9", - "time 0.2.27", - "version_check", -] - [[package]] name = "core-foundation" version = "0.9.3" @@ -869,12 +703,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cpuid-bool" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" - [[package]] name = "crc" version = "3.0.1" @@ -959,16 +787,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "cssparser" version = "0.29.6" @@ -996,15 +814,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" -dependencies = [ - "cipher", -] - [[package]] name = "cuid-util" version = "0.1.0" @@ -1051,20 +860,6 @@ dependencies = [ "matches", ] -[[package]] -name = "deadpool" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d126179d86aee4556e54f5f3c6bf6d9884e7cc52cef82f77ee6f90a7747616d" -dependencies = [ - "async-trait", - "config", - "crossbeam-queue", - "num_cpus", - "serde", - "tokio", -] - [[package]] name = "deepwell" version = "2023.11.13" @@ -1072,7 +867,6 @@ dependencies = [ "anyhow", "argon2", "arraystring", - "async-std", "async-trait", "built", "cfg-if", @@ -1108,14 +902,14 @@ dependencies = [ "sea-query", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "sqlx", "str-macro", "strum", "strum_macros", "subtle", "thiserror", - "time 0.3.30", + "time", "tiny-keccak", "tokio", "toml", @@ -1167,7 +961,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.109", ] @@ -1212,12 +1006,6 @@ dependencies = [ "winapi", ] -[[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.4" @@ -1545,7 +1333,7 @@ dependencies = [ "str-macro", "strum", "strum_macros", - "time 0.3.30", + "time", "tinyvec", "unicase", "wasm-bindgen", @@ -1727,16 +1515,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "ghash" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" -dependencies = [ - "opaque-debug", - "polyval", -] - [[package]] name = "gimli" version = "0.28.0" @@ -1839,33 +1617,13 @@ dependencies = [ "serde", ] -[[package]] -name = "hkdf" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" -dependencies = [ - "digest 0.9.0", - "hmac 0.10.1", -] - [[package]] name = "hkdf" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" dependencies = [ - "hmac 0.12.1", -] - -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac", - "digest 0.9.0", + "hmac", ] [[package]] @@ -1919,47 +1677,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http-client" -version = "6.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1947510dc91e2bf586ea5ffb412caad7673264e14bb39fb9078da114a94ce1a5" -dependencies = [ - "async-h1", - "async-std", - "async-tls", - "async-trait", - "cfg-if", - "dashmap", - "deadpool", - "futures", - "http-types", - "log", - "rustls 0.18.1", -] - -[[package]] -name = "http-types" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" -dependencies = [ - "anyhow", - "async-channel 1.9.0", - "async-std", - "base64 0.13.1", - "cookie", - "futures-lite 1.13.0", - "infer", - "pin-project-lite", - "rand 0.7.3", - "serde", - "serde_json", - "serde_qs", - "serde_urlencoded", - "url", -] - [[package]] name = "httparse" version = "1.8.0" @@ -2005,7 +1722,7 @@ dependencies = [ "futures-util", "http", "hyper", - "rustls 0.21.9", + "rustls", "tokio", "tokio-rustls", ] @@ -2053,12 +1770,6 @@ dependencies = [ "hashbrown 0.14.2", ] -[[package]] -name = "infer" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" - [[package]] name = "inherent" version = "1.0.10" @@ -2317,19 +2028,6 @@ dependencies = [ "spin 0.5.2", ] -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec", - "bitflags 1.3.2", - "cfg-if", - "ryu", - "static_assertions", -] - [[package]] name = "libc" version = "0.2.150" @@ -2486,16 +2184,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2523,17 +2211,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "nom" -version = "5.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b" -dependencies = [ - "lexical-core", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.3" @@ -2902,7 +2579,7 @@ checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" dependencies = [ "once_cell", "pest", - "sha2 0.10.8", + "sha2", ] [[package]] @@ -3073,17 +2750,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "polyval" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" -dependencies = [ - "cpuid-bool", - "opaque-debug", - "universal-hash", -] - [[package]] name = "powerfmt" version = "0.2.0" @@ -3414,7 +3080,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.9", + "rustls", "rustls-pemfile", "serde", "serde_json", @@ -3422,10 +3088,12 @@ dependencies = [ "system-configuration", "tokio", "tokio-rustls", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "webpki-roots 0.25.2", "winreg", @@ -3545,28 +3213,27 @@ version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6009d9d4cf910505534d62d380a0aa305805a2af0b5c3ad59a3024a0715b847" dependencies = [ - "async-std", "async-trait", "aws-creds", "aws-region", "base64 0.13.1", "cfg-if", - "futures-io", - "futures-util", "hex", - "hmac 0.12.1", + "hmac", "http", "log", "maybe-async", "md5", "percent-encoding", + "reqwest", "serde", "serde-xml-rs", "serde_derive", - "sha2 0.10.8", - "surf", + "sha2", "thiserror", - "time 0.3.30", + "time", + "tokio", + "tokio-stream", "url", ] @@ -3582,22 +3249,13 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.20", + "semver", ] [[package]] @@ -3627,19 +3285,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "rustls" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" -dependencies = [ - "base64 0.12.3", - "log", - "ring 0.16.20", - "sct 0.6.1", - "webpki", -] - [[package]] name = "rustls" version = "0.21.9" @@ -3649,7 +3294,7 @@ dependencies = [ "log", "ring 0.17.5", "rustls-webpki", - "sct 0.7.1", + "sct", ] [[package]] @@ -3698,16 +3343,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "sct" version = "0.7.1" @@ -3751,7 +3386,7 @@ dependencies = [ "sqlx", "strum", "thiserror", - "time 0.3.30", + "time", "tracing", "url", "uuid", @@ -3782,7 +3417,7 @@ dependencies = [ "ordered-float", "sea-query-derive", "serde_json", - "time 0.3.30", + "time", ] [[package]] @@ -3794,7 +3429,7 @@ dependencies = [ "sea-query", "serde_json", "sqlx", - "time 0.3.30", + "time", ] [[package]] @@ -3831,27 +3466,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e388332cd64eb80cd595a00941baf513caffae8dce9cfd0467fc9c66397dade6" -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "serde" version = "1.0.192" @@ -3915,17 +3535,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_qs" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6" -dependencies = [ - "percent-encoding", - "serde", - "thiserror", -] - [[package]] name = "serde_repr" version = "0.1.17" @@ -3971,15 +3580,6 @@ dependencies = [ "opaque-debug", ] -[[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" version = "0.10.6" @@ -3997,19 +3597,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha2" version = "0.10.8" @@ -4065,15 +3652,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" -[[package]] -name = "simple-mutex" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38aabbeafa6f6dead8cebf246fe9fae1f9215c8d29b3a69f93bd62a9e4a3dcd6" -dependencies = [ - "event-listener 2.5.3", -] - [[package]] name = "siphasher" version = "0.3.11" @@ -4163,7 +3741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" dependencies = [ "itertools 0.11.0", - "nom 7.1.3", + "nom", "unicode_categories", ] @@ -4187,8 +3765,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d6753e460c998bbd4cd8c6f0ed9a64346fcca0723d6e75e52fdc351c5d2169d" dependencies = [ "ahash 0.8.6", - "async-io", - "async-std", "atoi", "byteorder", "bytes", @@ -4210,15 +3786,17 @@ dependencies = [ "once_cell", "paste", "percent-encoding", - "rustls 0.21.9", + "rustls", "rustls-pemfile", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "smallvec", "sqlformat", "thiserror", - "time 0.3.30", + "time", + "tokio", + "tokio-stream", "tracing", "url", "webpki-roots 0.24.0", @@ -4243,7 +3821,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a4ee1e104e00dedb6aa5ffdd1343107b0a4702e862a84320ee7cc74782d96fc" dependencies = [ - "async-std", "dotenvy", "either", "heck", @@ -4253,13 +3830,14 @@ dependencies = [ "quote", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "sqlx-core", "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", "syn 1.0.109", "tempfile", + "tokio", "url", ] @@ -4284,8 +3862,8 @@ dependencies = [ "futures-util", "generic-array", "hex", - "hkdf 0.12.3", - "hmac 0.12.1", + "hkdf", + "hmac", "itoa", "log", "md-5", @@ -4295,13 +3873,13 @@ dependencies = [ "rand 0.8.5", "rsa", "serde", - "sha1 0.10.6", - "sha2 0.10.8", + "sha1", + "sha2", "smallvec", "sqlx-core", "stringprep", "thiserror", - "time 0.3.30", + "time", "tracing", "whoami", ] @@ -4324,8 +3902,8 @@ dependencies = [ "futures-io", "futures-util", "hex", - "hkdf 0.12.3", - "hmac 0.12.1", + "hkdf", + "hmac", "home", "itoa", "log", @@ -4335,13 +3913,13 @@ dependencies = [ "rand 0.8.5", "serde", "serde_json", - "sha1 0.10.6", - "sha2 0.10.8", + "sha1", + "sha2", "smallvec", "sqlx-core", "stringprep", "thiserror", - "time 0.3.30", + "time", "tracing", "whoami", ] @@ -4364,75 +3942,17 @@ dependencies = [ "percent-encoding", "serde", "sqlx-core", - "time 0.3.30", + "time", "tracing", "url", ] -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[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", - "quote", - "serde", - "serde_derive", - "syn 1.0.109", -] - -[[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", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1 0.6.1", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - [[package]] name = "str-macro" version = "1.0.0" @@ -4481,28 +4001,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "surf" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718b1ae6b50351982dedff021db0def601677f2120938b070eadb10ba4038dd7" -dependencies = [ - "async-std", - "async-trait", - "cfg-if", - "futures-util", - "getrandom 0.2.11", - "http-client", - "http-types", - "log", - "mime_guess", - "once_cell", - "pin-project-lite", - "rustls 0.18.1", - "serde", - "serde_json", -] - [[package]] name = "sval" version = "2.10.2" @@ -4674,21 +4172,6 @@ dependencies = [ "syn 2.0.39", ] -[[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", - "winapi", -] - [[package]] name = "time" version = "0.3.30" @@ -4700,7 +4183,7 @@ dependencies = [ "powerfmt", "serde", "time-core", - "time-macros 0.2.15", + "time-macros", ] [[package]] @@ -4709,16 +4192,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" -[[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]] name = "time-macros" version = "0.2.15" @@ -4728,19 +4201,6 @@ dependencies = [ "time-core", ] -[[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", - "quote", - "standback", - "syn 1.0.109", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -4821,7 +4281,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.9", + "rustls", "tokio", ] @@ -5050,16 +4510,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" -[[package]] -name = "universal-hash" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "untrusted" version = "0.7.1" @@ -5081,7 +4531,6 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", - "serde", ] [[package]] @@ -5259,32 +4708,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] -name = "web-sys" -version = "0.3.65" +name = "wasm-streams" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" dependencies = [ + "futures-util", "js-sys", "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", ] [[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - -[[package]] -name = "webpki-roots" -version = "0.20.0" +name = "web-sys" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ - "webpki", + "js-sys", + "wasm-bindgen", ] [[package]] diff --git a/deepwell/Cargo.toml b/deepwell/Cargo.toml index 901703dbe6..00e2597378 100644 --- a/deepwell/Cargo.toml +++ b/deepwell/Cargo.toml @@ -19,7 +19,6 @@ watch = ["notify"] anyhow = "1" argon2 = "0.5" arraystring = "0.3" -async-std = { version = "1", features = ["attributes"] } async-trait = "0.1" cfg-if = "1" clap = "4" @@ -49,13 +48,13 @@ ref-map = "0.1" regex = "1" reqwest = { version = "0.11", features = ["json", "rustls-tls"], default-features = false } rsmq_async = "7" -rust-s3 = { version = "0.32", features = ["with-async-std"], default-features = false } -sea-orm = { version = "0.12", features = ["sqlx-postgres", "runtime-async-std-rustls", "postgres-array", "macros", "with-json", "with-time"], default-features = false } +rust-s3 = { version = "0.32", features = ["with-tokio"], default-features = false } +sea-orm = { version = "0.12", features = ["sqlx-postgres", "runtime-tokio-rustls", "postgres-array", "macros", "with-json", "with-time"], default-features = false } sea-query = "0.30" serde = { version = "1", features = ["derive"] } serde_json = "1" sha2 = "0.10" -sqlx = { version = "0.7", features = ["macros", "migrate", "postgres", "runtime-async-std-rustls"], default-features = false } +sqlx = { version = "0.7", features = ["macros", "migrate", "postgres", "runtime-tokio-rustls"], default-features = false } str-macro = "1" strum = "0.25" strum_macros = "0.25" diff --git a/deepwell/src/locales/fluent.rs b/deepwell/src/locales/fluent.rs index 7915c9752a..34cba62efc 100644 --- a/deepwell/src/locales/fluent.rs +++ b/deepwell/src/locales/fluent.rs @@ -21,15 +21,14 @@ use super::error::{fluent_load_err, LocalizationLoadError}; use super::fallback::iterate_locale_fallbacks; use crate::services::Error as ServiceError; -use async_std::fs; -use async_std::path::{Path, PathBuf}; -use async_std::prelude::*; use fluent::{bundle, FluentArgs, FluentMessage, FluentResource}; use fluent_syntax::ast::Pattern; use intl_memoizer::concurrent::IntlLangMemoizer; use std::borrow::Cow; use std::collections::HashMap; use std::fmt::{self, Debug, Display}; +use std::path::{Path, PathBuf}; +use tokio::fs; use unic_langid::LanguageIdentifier; pub type FluentBundle = bundle::FluentBundle; @@ -53,8 +52,7 @@ impl Localizations { let mut bundles = HashMap::new(); let mut entries = fs::read_dir(&directory).await?; - while let Some(result) = entries.next().await { - let entry = result?; + while let Some(entry) = entries.next_entry().await? { let path = entry.path(); Self::load_component(&mut bundles, &path).await?; } @@ -69,8 +67,7 @@ impl Localizations { debug!("Reading component at {}", directory.display()); let mut entries = fs::read_dir(directory).await?; - while let Some(result) = entries.next().await { - let entry = result?; + while let Some(entry) = entries.next_entry().await? { let path = entry.path(); // Get locale from filename diff --git a/deepwell/src/services/password.rs b/deepwell/src/services/password.rs index dcfdd9bee3..6884fb89aa 100644 --- a/deepwell/src/services/password.rs +++ b/deepwell/src/services/password.rs @@ -23,8 +23,8 @@ use crate::utils::assert_is_csprng; use argon2::{ password_hash::SaltString, Argon2, PasswordHash, PasswordHasher, PasswordVerifier, }; -use async_std::task; use rand::thread_rng; +use tokio::time; #[derive(Debug)] pub struct PasswordService; @@ -116,6 +116,6 @@ impl PasswordService { /// Sleeps for a bit after authentication failure. pub async fn failure_sleep(config: &Config) { - task::sleep(config.authentication_fail_delay).await; + time::sleep(config.authentication_fail_delay).await; } } diff --git a/deepwell/src/services/render/service.rs b/deepwell/src/services/render/service.rs index 53b06a0d44..a4a5f7cc39 100644 --- a/deepwell/src/services/render/service.rs +++ b/deepwell/src/services/render/service.rs @@ -20,7 +20,7 @@ use super::prelude::*; use crate::services::TextService; -use async_std::future::timeout; +use tokio::time::timeout; #[derive(Debug)] pub struct RenderService;