diff --git a/.circleci/config.yml b/.circleci/config.yml index 925bbc209..f8f86c2ad 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -93,6 +93,17 @@ commands: shuttle-shared-db = { path = "$PWD/resources/shared-db" } shuttle-secrets = { path = "$PWD/resources/secrets" } shuttle-static-folder = { path = "$PWD/resources/static-folder" } + shuttle-axum = { path = "$PWD/services/shuttle-axum" } + shuttle-actix-web = { path = "$PWD/services/shuttle-actix-web" } + shuttle-poem = { path = "$PWD/services/shuttle-poem" } + shuttle-poise = { path = "$PWD/services/shuttle-poise" } + shuttle-rocket = { path = "$PWD/services/shuttle-rocket" } + shuttle-salvo = { path = "$PWD/services/shuttle-salvo" } + shuttle-serenity = { path = "$PWD/services/shuttle-serenity" } + shuttle-thruster = { path = "$PWD/services/shuttle-thruster" } + shuttle-tide = { path = "$PWD/services/shuttle-tide" } + shuttle-tower = { path = "$PWD/services/shuttle-tower" } + shuttle-warp = { path = "$PWD/services/shuttle-warp" } EOF install-rust: steps: @@ -162,10 +173,6 @@ jobs: - run: cargo check --workspace --all-targets - save-cargo-cache workspace-clippy: - parameters: - framework: - description: "Framework to activate" - type: string executor: docker-rust steps: - checkout @@ -174,7 +181,7 @@ jobs: - run: | cargo clippy --tests \ --all-targets \ - --features="codegen,builder,<< parameters.framework >>" \ + --all-features \ --no-deps -- \ --D warnings \ -A clippy::let-unit-value \ @@ -393,25 +400,8 @@ workflows: jobs: - workspace-fmt - workspace-clippy: - name: workspace-clippy-<< matrix.framework >> requires: - workspace-fmt - matrix: - parameters: - framework: - [ - "web-actix-web", - "web-axum", - "web-rocket", - "web-poem", - "web-thruster", - "web-tide", - "web-tower", - "web-warp", - "web-salvo", - "bot-serenity", - "bot-poise", - ] - check-standalone: matrix: parameters: @@ -421,6 +411,17 @@ workflows: - resources/secrets - resources/shared-db - resources/static-folder + - services/shuttle-actix-web + - services/shuttle-axum + - services/shuttle-poem + - services/shuttle-poise + - services/shuttle-rocket + - services/shuttle-salvo + - services/shuttle-serenity + - services/shuttle-thruster + - services/shuttle-tide + - services/shuttle-tower + - services/shuttle-warp - service-test: requires: - workspace-clippy diff --git a/Cargo.lock b/Cargo.lock index 5b9fd1397..ec6ba3832 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "453e534d4f46dcdddd7aa8619e9a664e153f34383d14710db0b0d76c2964db89" dependencies = [ - "base64 0.13.1", + "base64", "hyper", "openssl", "reqwest", @@ -20,185 +20,6 @@ dependencies = [ "tracing-futures", ] -[[package]] -name = "actix-codec" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" -dependencies = [ - "bitflags", - "bytes 1.3.0", - "futures-core", - "futures-sink", - "log", - "memchr", - "pin-project-lite 0.2.9", - "tokio", - "tokio-util 0.7.3", -] - -[[package]] -name = "actix-http" -version = "3.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c83abf9903e1f0ad9973cc4f7b9767fd5a03a583f51a5b7a339e07987cd2724" -dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-utils", - "ahash", - "base64 0.13.1", - "bitflags", - "brotli", - "bytes 1.3.0", - "bytestring", - "derive_more", - "encoding_rs", - "flate2", - "futures-core", - "h2", - "http 0.2.8", - "httparse", - "httpdate", - "itoa 1.0.2", - "language-tags", - "local-channel", - "mime", - "percent-encoding", - "pin-project-lite 0.2.9", - "rand 0.8.5", - "sha1 0.10.4", - "smallvec", - "tracing", - "zstd", -] - -[[package]] -name = "actix-macros" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" -dependencies = [ - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "actix-router" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799" -dependencies = [ - "bytestring", - "http 0.2.8", - "regex", - "serde", - "tracing", -] - -[[package]] -name = "actix-rt" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000" -dependencies = [ - "futures-core", - "tokio", -] - -[[package]] -name = "actix-server" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da34f8e659ea1b077bb4637948b815cd3768ad5a188fdcd74ff4d84240cd824" -dependencies = [ - "actix-rt", - "actix-service", - "actix-utils", - "futures-core", - "futures-util", - "mio", - "num_cpus", - "socket2", - "tokio", - "tracing", -] - -[[package]] -name = "actix-service" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" -dependencies = [ - "futures-core", - "paste", - "pin-project-lite 0.2.9", -] - -[[package]] -name = "actix-utils" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" -dependencies = [ - "local-waker", - "pin-project-lite 0.2.9", -] - -[[package]] -name = "actix-web" -version = "4.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48f7b6534e06c7bfc72ee91db7917d4af6afe23e7d223b51e68fffbb21e96b9" -dependencies = [ - "actix-codec", - "actix-http", - "actix-macros", - "actix-router", - "actix-rt", - "actix-server", - "actix-service", - "actix-utils", - "actix-web-codegen", - "ahash", - "bytes 1.3.0", - "bytestring", - "cfg-if 1.0.0", - "cookie 0.16.0", - "derive_more", - "encoding_rs", - "futures-core", - "futures-util", - "http 0.2.8", - "itoa 1.0.2", - "language-tags", - "log", - "mime", - "once_cell", - "pin-project-lite 0.2.9", - "regex", - "serde", - "serde_json", - "serde_urlencoded", - "smallvec", - "socket2", - "time 0.3.11", - "url", -] - -[[package]] -name = "actix-web-codegen" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa9362663c8643d67b2d5eafba49e4cb2c8a053a29ed00a0bea121f17c76b13" -dependencies = [ - "actix-router", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", -] - [[package]] name = "addr2line" version = "0.17.0" @@ -214,102 +35,13 @@ 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 = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -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 0.2.5", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if 1.0.0", - "cipher 0.3.0", - "cpufeatures", - "opaque-debug", -] - -[[package]] -name = "aes-gcm" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" -dependencies = [ - "aead 0.3.2", - "aes 0.6.0", - "cipher 0.2.5", - "ctr 0.6.0", - "ghash 0.3.1", - "subtle", -] - -[[package]] -name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", - "ghash 0.4.4", - "subtle", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug", -] - [[package]] name = "ahash" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.7", + "getrandom", "once_cell", "version_check", ] @@ -323,21 +55,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - [[package]] name = "ambient-authority" version = "0.0.1" @@ -397,107 +114,6 @@ dependencies = [ "wait-timeout", ] -[[package]] -name = "async-channel" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-compression" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695" -dependencies = [ - "brotli", - "flate2", - "futures-core", - "memchr", - "pin-project-lite 0.2.9", - "tokio", -] - -[[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.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "once_cell", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5262ed948da60dd8956c6c5aca4d4163593dddb7b32d73267c93dab7b2e98940" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-lock", - "blocking", - "futures-lite", - "num_cpus", - "once_cell", - "tokio", -] - -[[package]] -name = "async-h1" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8101020758a4fc3a7c326cb42aa99e9fa77cbfb76987c128ad956406fe1f70a7" -dependencies = [ - "async-channel", - "async-dup", - "async-std", - "futures-core", - "http-types", - "httparse", - "log", - "pin-project", -] - -[[package]] -name = "async-io" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07" -dependencies = [ - "concurrent-queue", - "futures-lite", - "libc", - "log", - "once_cell", - "parking", - "polling", - "slab", - "socket2", - "waker-fn", - "winapi", -] - [[package]] name = "async-lock" version = "2.5.0" @@ -507,44 +123,6 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-process" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2c06e30a24e8c78a3987d07f0930edf76ef35e027e7bdb063fccafdad1f60c" -dependencies = [ - "async-io", - "blocking", - "cfg-if 1.0.0", - "event-listener", - "futures-lite", - "libc", - "once_cell", - "signal-hook", - "winapi", -] - -[[package]] -name = "async-session" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345022a2eed092cd105cc1b26fd61c341e100bd5fcbbd792df4baf31c2cc631f" -dependencies = [ - "anyhow", - "async-std", - "async-trait", - "base64 0.12.3", - "bincode", - "blake3", - "chrono", - "hmac 0.8.1", - "kv-log-macro", - "rand 0.7.3", - "serde", - "serde_json", - "sha2 0.9.9", -] - [[package]] name = "async-session" version = "3.0.0" @@ -554,59 +132,18 @@ dependencies = [ "anyhow", "async-lock", "async-trait", - "base64 0.13.1", + "base64", "bincode", "blake3", "chrono", "hmac 0.11.0", "log", - "rand 0.8.5", + "rand", "serde", "serde_json", "sha2 0.9.9", ] -[[package]] -name = "async-sse" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bba003996b8fd22245cd0c59b869ba764188ed435392cf2796d03b805ade10" -dependencies = [ - "async-channel", - "async-std", - "http-types", - "log", - "memchr", - "pin-project-lite 0.1.12", -] - -[[package]] -name = "async-std" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" -dependencies = [ - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite 0.2.9", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - [[package]] name = "async-stream" version = "0.3.3" @@ -623,42 +160,20 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] -[[package]] -name = "async-task" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" - [[package]] name = "async-trait" version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "async-tungstenite" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b71b31561643aa8e7df3effe284fa83ab1a840e52294c5f4bd7bfd8b2becbb" -dependencies = [ - "futures-io", - "futures-util", - "log", - "pin-project-lite 0.2.9", - "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -670,21 +185,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "atomic" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c" -dependencies = [ - "autocfg 1.1.0", -] - -[[package]] -name = "atomic-waker" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" - [[package]] name = "atty" version = "0.2.14" @@ -696,15 +196,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "autocfg" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" -dependencies = [ - "autocfg 1.1.0", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -727,12 +218,12 @@ dependencies = [ "aws-smithy-json", "aws-smithy-types", "aws-types", - "bytes 1.3.0", + "bytes", "hex 0.4.3", - "http 0.2.8", + "http", "hyper", "ring", - "time 0.3.11", + "time", "tokio", "tower", "tracing", @@ -748,7 +239,7 @@ dependencies = [ "aws-smithy-http", "aws-smithy-types", "aws-types", - "http 0.2.8", + "http", "regex", "tracing", ] @@ -762,12 +253,12 @@ dependencies = [ "aws-smithy-http", "aws-smithy-types", "aws-types", - "bytes 1.3.0", - "http 0.2.8", + "bytes", + "http", "http-body", "lazy_static", "percent-encoding", - "pin-project-lite 0.2.9", + "pin-project-lite", "tracing", ] @@ -788,8 +279,8 @@ dependencies = [ "aws-smithy-types", "aws-smithy-xml", "aws-types", - "bytes 1.3.0", - "http 0.2.8", + "bytes", + "http", "tokio-stream", "tower", ] @@ -810,8 +301,8 @@ dependencies = [ "aws-smithy-json", "aws-smithy-types", "aws-types", - "bytes 1.3.0", - "http 0.2.8", + "bytes", + "http", "tokio-stream", "tower", ] @@ -833,8 +324,8 @@ dependencies = [ "aws-smithy-types", "aws-smithy-xml", "aws-types", - "bytes 1.3.0", - "http 0.2.8", + "bytes", + "http", "tower", ] @@ -847,7 +338,7 @@ dependencies = [ "aws-sigv4", "aws-smithy-http", "aws-types", - "http 0.2.8", + "http", "tracing", ] @@ -860,12 +351,12 @@ dependencies = [ "aws-smithy-http", "form_urlencoded", "hex 0.4.3", - "http 0.2.8", + "http", "once_cell", "percent-encoding", "regex", "ring", - "time 0.3.11", + "time", "tracing", ] @@ -876,7 +367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b3442b4c5d3fc39891a2e5e625735fba6b24694887d49c6518460fde98247a9" dependencies = [ "futures-util", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", "tokio-stream", ] @@ -891,14 +382,14 @@ dependencies = [ "aws-smithy-http", "aws-smithy-http-tower", "aws-smithy-types", - "bytes 1.3.0", + "bytes", "fastrand", - "http 0.2.8", + "http", "http-body", "hyper", "hyper-rustls", "lazy_static", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", "tower", "tracing", @@ -911,18 +402,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf58ed4fefa61dbf038e5421a521cbc2c448ef69deff0ab1d915d8a10eda5664" dependencies = [ "aws-smithy-types", - "bytes 1.3.0", + "bytes", "bytes-utils", "futures-core", - "http 0.2.8", + "http", "http-body", "hyper", "once_cell", "percent-encoding", - "pin-project-lite 0.2.9", + "pin-project-lite", "pin-utils", "tokio", - "tokio-util 0.7.3", + "tokio-util", "tracing", ] @@ -933,10 +424,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20c96d7bd35e7cf96aca1134b2f81b1b59ffe493f7c6539c051791cbbf7a42d3" dependencies = [ "aws-smithy-http", - "bytes 1.3.0", - "http 0.2.8", + "bytes", + "http", "http-body", - "pin-project-lite 0.2.9", + "pin-project-lite", "tower", "tracing", ] @@ -966,10 +457,10 @@ version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b02e06ea63498c43bc0217ea4d16605d4e58d85c12fc23f6572ff6d0a840c61" dependencies = [ - "itoa 1.0.2", + "itoa", "num-integer", "ryu", - "time 0.3.11", + "time", ] [[package]] @@ -991,7 +482,7 @@ dependencies = [ "aws-smithy-client", "aws-smithy-http", "aws-smithy-types", - "http 0.2.8", + "http", "rustc_version 0.4.0", "tracing", "zeroize", @@ -1005,20 +496,20 @@ checksum = "744864363a200a5e724a7e61bc8c11b6628cf2e3ec519c8a1a48e609a8156b40" dependencies = [ "async-trait", "axum-core", - "base64 0.13.1", + "base64", "bitflags", - "bytes 1.3.0", + "bytes", "futures-util", "headers", - "http 0.2.8", + "http", "http-body", "hyper", - "itoa 1.0.2", + "itoa", "matchit", "memchr", "mime", "percent-encoding", - "pin-project-lite 0.2.9", + "pin-project-lite", "rustversion", "serde", "serde_json", @@ -1041,9 +532,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79b8558f5a0581152dc94dcd289132a1d377494bdeafcd41869b3258e3e2ad92" dependencies = [ "async-trait", - "bytes 1.3.0", + "bytes", "futures-util", - "http 0.2.8", + "http", "http-body", "mime", "rustversion", @@ -1058,12 +549,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9a320103719de37b7b4da4c8eb629d4573f6bcfd3dfe80d3208806895ccf81d" dependencies = [ "axum", - "bytes 1.3.0", + "bytes", "cookie 0.16.0", "futures-util", - "http 0.2.8", + "http", "mime", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", "tower", "tower-http 0.3.5", @@ -1078,12 +569,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51227033e4d3acad15c879092ac8a228532707b5db5ff2628f638334f63e1b7a" dependencies = [ "axum", - "bytes 1.3.0", + "bytes", "cookie 0.17.0", "futures-util", - "http 0.2.8", + "http", "mime", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", "tower", "tower-http 0.3.5", @@ -1098,14 +589,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8456dab8f11484979a86651da8e619b355ede5d61a160755155f6c344bd18c47" dependencies = [ "arc-swap", - "bytes 1.3.0", + "bytes", "futures-util", - "http 0.2.8", + "http", "http-body", "hyper", - "pin-project-lite 0.2.9", + "pin-project-lite", "rustls", - "rustls-pemfile 1.0.1", + "rustls-pemfile", "tokio", "tokio-rustls", "tower-service", @@ -1117,7 +608,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b114309d293dd8a6fedebf09d5b8bbb0f7647b3d204ca0dd333b5f797aed5c8" dependencies = [ - "async-session 3.0.0", + "async-session", "axum", "axum-extra 0.4.2", "futures", @@ -1127,30 +618,12 @@ dependencies = [ "tracing", ] -[[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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "binascii" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72" - [[package]] name = "bincode" version = "1.3.3" @@ -1208,44 +681,30 @@ dependencies = [ "generic-array", ] -[[package]] -name = "blocking" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc" -dependencies = [ - "async-channel", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", - "once_cell", -] - [[package]] name = "bollard" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d82e7850583ead5f8bbef247e2a3c37a19bd576e8420cd262a6711921827e1e5" dependencies = [ - "base64 0.13.1", + "base64", "bollard-stubs", - "bytes 1.3.0", + "bytes", "futures-core", "futures-util", "hex 0.4.3", - "http 0.2.8", + "http", "hyper", "hyperlocal", "log", - "pin-project-lite 0.2.9", + "pin-project-lite", "serde", "serde_derive", "serde_json", "serde_urlencoded", "thiserror", "tokio", - "tokio-util 0.7.3", + "tokio-util", "url", "winapi", ] @@ -1260,27 +719,6 @@ dependencies = [ "serde_with", ] -[[package]] -name = "brotli" -version = "3.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - [[package]] name = "bson" version = "2.5.0" @@ -1288,16 +726,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8746d07211bb12a7c34d995539b4a2acd4e0b0e757de98ce2ab99bcf17443fad" dependencies = [ "ahash", - "base64 0.13.1", + "base64", "hex 0.4.3", "indexmap", "lazy_static", - "rand 0.8.5", + "rand", "serde", "serde_bytes", "serde_json", - "time 0.3.11", - "uuid 1.2.2", + "time", + "uuid", ] [[package]] @@ -1323,16 +761,6 @@ dependencies = [ "serde", ] -[[package]] -name = "buf_redux" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" -dependencies = [ - "memchr", - "safemem", -] - [[package]] name = "bumpalo" version = "3.10.0" @@ -1345,22 +773,6 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "iovec", -] - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.3.0" @@ -1373,7 +785,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1934a3ef9cac8efde4966a92781e77713e1ba329f1d42e446c7d7eba340d8ef1" dependencies = [ - "bytes 1.3.0", + "bytes", "either", ] @@ -1383,21 +795,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70" -[[package]] -name = "bytestring" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7f83e57d9154148e355404702e2694463241880b939570d7c97c014da7a69a1" -dependencies = [ - "bytes 1.3.0", -] - -[[package]] -name = "cache-padded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" - [[package]] name = "camino" version = "1.0.9" @@ -1443,7 +840,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53df044ddcb88611e19b712211b342ab106105cf658406f5ed4ee09ab10ed727" dependencies = [ "ambient-authority", - "rand 0.8.5", + "rand", ] [[package]] @@ -1526,7 +923,7 @@ dependencies = [ "termcolor", "toml_edit 0.14.4", "unicode-width", - "unicode-xid 0.2.3", + "unicode-xid", "url", "walkdir", "winapi", @@ -1625,7 +1022,7 @@ dependencies = [ "tracing", "tracing-subscriber", "url", - "uuid 1.2.2", + "uuid", "webbrowser", ] @@ -1699,12 +1096,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ "iana-time-zone", - "js-sys", "num-integer", "num-traits", "serde", - "time 0.1.44", - "wasm-bindgen", "winapi", ] @@ -1714,24 +1108,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array", -] - [[package]] name = "clap" version = "3.2.23" @@ -1782,9 +1158,9 @@ checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1795,9 +1171,9 @@ checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1818,15 +1194,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "colored" version = "2.0.0" @@ -1844,7 +1211,7 @@ version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" dependencies = [ - "bytes 1.3.0", + "bytes", "memchr", ] @@ -1901,15 +1268,6 @@ version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad159cc964ac8f9d407cbc0aa44b02436c054b541f2b4b5f06972e1efdc54bc7" -[[package]] -name = "concurrent-queue" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" -dependencies = [ - "cache-padded", -] - [[package]] name = "console" version = "0.15.2" @@ -1924,12 +1282,6 @@ dependencies = [ "winapi", ] -[[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" @@ -1942,38 +1294,19 @@ 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 0.8.0", - "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 = "cookie" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94d4706de1b0fa5b132270cddffa8585166037822e260a944fe161acd137ca05" dependencies = [ - "aes-gcm 0.9.4", - "base64 0.13.1", - "hkdf 0.12.3", + "base64", "hmac 0.12.1", "percent-encoding", - "rand 0.8.5", + "rand", "sha2 0.10.2", "subtle", - "time 0.3.11", + "time", "version_check", ] @@ -1984,7 +1317,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" dependencies = [ "percent-encoding", - "time 0.3.11", + "time", "version_check", ] @@ -2022,12 +1355,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 = "cranelift-bforest" version = "0.91.0" @@ -2227,7 +1554,7 @@ version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "autocfg 1.1.0", + "autocfg", "cfg-if 1.0.0", "crossbeam-utils", "memoffset 0.7.1", @@ -2279,16 +1606,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "cruet" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d174765c7d11eb16f70a4213583aac2ca5ae1ebd1e233c6d5104bfb70fce3" -dependencies = [ - "once_cell", - "regex", -] - [[package]] name = "crypto-common" version = "0.1.3" @@ -2321,16 +1638,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "crypto-mac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "crypto-mac" version = "0.11.1" @@ -2347,26 +1654,8 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" -dependencies = [ - "cipher 0.2.5", -] - -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher 0.3.0", + "quote", + "syn", ] [[package]] @@ -2412,18 +1701,8 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - -[[package]] -name = "darling" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02" -dependencies = [ - "darling_core 0.14.1", - "darling_macro 0.14.1", + "darling_core", + "darling_macro", ] [[package]] @@ -2434,24 +1713,10 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.47", - "quote 1.0.21", - "strsim", - "syn 1.0.104", -] - -[[package]] -name = "darling_core" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "strsim", - "syn 1.0.104", + "syn", ] [[package]] @@ -2460,20 +1725,9 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ - "darling_core 0.13.4", - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "darling_macro" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" -dependencies = [ - "darling_core 0.14.1", - "quote 1.0.21", - "syn 1.0.104", + "darling_core", + "quote", + "syn", ] [[package]] @@ -2487,7 +1741,6 @@ dependencies = [ "lock_api", "once_cell", "parking_lot_core 0.9.3", - "serde", ] [[package]] @@ -2500,57 +1753,24 @@ checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" name = "derivative" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2 1.0.47", - "quote 1.0.21", - "rustc_version 0.4.0", - "syn 1.0.104", -] - -[[package]] -name = "devise" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c7580b072f1c8476148f16e0a0d5dedddab787da98d86c5082c5e9ed8ab595" -dependencies = [ - "devise_codegen", - "devise_core", -] - -[[package]] -name = "devise_codegen" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123c73e7a6e51b05c75fe1a1b2f4e241399ea5740ed810b0e3e6cacd9db5e7b2" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "devise_core", - "quote 1.0.21", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "devise_core" -version = "0.3.1" +name = "derive_more" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841ef46f4787d9097405cac4e70fb8644fc037b526e8c14054247c0263c400d0" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "bitflags", - "proc-macro2 1.0.47", - "proc-macro2-diagnostics", - "quote 1.0.21", - "syn 1.0.104", + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn", ] [[package]] @@ -2648,12 +1868,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - [[package]] name = "doc-comment" version = "0.3.3" @@ -2703,29 +1917,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" dependencies = [ "heck", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "enumflags2" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75d4cd21b95383444831539909fbb14b9dc3fdceb2a6f5d36577329a1f55ccb" -dependencies = [ - "enumflags2_derive", -] - -[[package]] -name = "enumflags2_derive" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" -dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2751,15 +1945,6 @@ dependencies = [ "url", ] -[[package]] -name = "erased-serde" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d013529d5574a60caeda29e179e695125448e5de52e3874f7b4c1d7360e18e" -dependencies = [ - "serde", -] - [[package]] name = "errno" version = "0.2.8" @@ -2802,36 +1987,6 @@ dependencies = [ "instant", ] -[[package]] -name = "femme" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc04871e5ae3aa2952d552dae6b291b3099723bf779a8054281c1366a54613ef" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "figment" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "790b4292c72618abbab50f787a477014fe15634f96291de45672ce46afe122df" -dependencies = [ - "atomic", - "pear", - "serde", - "toml", - "uncased", - "version_check", -] - [[package]] name = "file-per-thread-logger" version = "0.1.5" @@ -2930,12 +2085,6 @@ dependencies = [ "windows-sys 0.42.0", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "futures" version = "0.3.25" @@ -2995,30 +2144,15 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" -[[package]] -name = "futures-lite" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.9", - "waker-fn", -] - [[package]] name = "futures-macro" version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -3046,7 +2180,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite", "pin-utils", "slab", ] @@ -3079,19 +2213,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "generator" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1d9279ca822891c1a4dae06d185612cf8fc6acfe5dff37781b41297811b12ee" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "winapi", -] - [[package]] name = "generic-array" version = "0.14.5" @@ -3102,17 +2223,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.7" @@ -3121,27 +2231,7 @@ checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "ghash" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" -dependencies = [ - "opaque-debug", - "polyval 0.4.5", -] - -[[package]] -name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug", - "polyval 0.5.3", + "wasi", ] [[package]] @@ -3201,34 +2291,22 @@ dependencies = [ "regex", ] -[[package]] -name = "gloo-timers" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "h2" version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" dependencies = [ - "bytes 1.3.0", + "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.8", + "http", "indexmap", "slab", "tokio", - "tokio-util 0.7.3", + "tokio-util", "tracing", ] @@ -3256,14 +2334,14 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ - "base64 0.13.1", + "base64", "bitflags", - "bytes 1.3.0", + "bytes", "headers-core", - "http 0.2.8", + "http", "httpdate", "mime", - "sha1 0.10.4", + "sha1", ] [[package]] @@ -3272,7 +2350,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http 0.2.8", + "http", ] [[package]] @@ -3317,16 +2395,6 @@ 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" @@ -3336,26 +2404,6 @@ dependencies = [ "hmac 0.12.1", ] -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac 0.10.1", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.11.0" @@ -3395,26 +2443,15 @@ dependencies = [ "winapi", ] -[[package]] -name = "http" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" -dependencies = [ - "bytes 0.4.12", - "fnv", - "itoa 0.4.8", -] - [[package]] name = "http" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "bytes 1.3.0", + "bytes", "fnv", - "itoa 1.0.2", + "itoa", ] [[package]] @@ -3423,21 +2460,9 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.3.0", - "http 0.2.8", - "pin-project-lite 0.2.9", -] - -[[package]] -name = "http-client" -version = "6.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1947510dc91e2bf586ea5ffb412caad7673264e14bb39fb9078da114a94ce1a5" -dependencies = [ - "async-trait", - "cfg-if 1.0.0", - "http-types", - "log", + "bytes", + "http", + "pin-project-lite", ] [[package]] @@ -3452,30 +2477,8 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e272971f774ba29341db2f686255ff8a979365a26fb9e4277f6b6d9ec0cdd5e" dependencies = [ - "http 0.2.8", - "serde", -] - -[[package]] -name = "http-types" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" -dependencies = [ - "anyhow", - "async-channel", - "async-std", - "base64 0.13.1", - "cookie 0.14.4", - "futures-lite", - "infer", - "pin-project-lite 0.2.9", - "rand 0.7.3", + "http", "serde", - "serde_json", - "serde_qs", - "serde_urlencoded", - "url", ] [[package]] @@ -3502,17 +2505,17 @@ version = "0.14.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" dependencies = [ - "bytes 1.3.0", + "bytes", "futures-channel", "futures-core", "futures-util", "h2", - "http 0.2.8", + "http", "http-body", "httparse", "httpdate", - "itoa 1.0.2", - "pin-project-lite 0.2.9", + "itoa", + "pin-project-lite", "socket2", "tokio", "tower-service", @@ -3548,7 +2551,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" dependencies = [ - "http 0.2.8", + "http", "hyper", "log", "rustls", @@ -3564,7 +2567,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ "hyper", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", "tokio-io-timeout", ] @@ -3575,7 +2578,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.3.0", + "bytes", "hyper", "native-tls", "tokio", @@ -3660,7 +2663,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1955a75fa080c677d3972822ec4bad316169ab1cfc6c257a942c2265dbe5fe" dependencies = [ "bitmaps", - "rand_core 0.6.3", + "rand_core", "rand_xoshiro", "sized-chunks", "typenum", @@ -3673,7 +2676,7 @@ version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ - "autocfg 1.1.0", + "autocfg", "hashbrown", "serde", ] @@ -3696,18 +2699,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adab1eaa3408fb7f0c777a73e7465fd5656136fc93b670eb6df3c88c2c1344e3" -[[package]] -name = "infer" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" - -[[package]] -name = "inlinable_string" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" - [[package]] name = "instant" version = "0.1.12" @@ -3723,7 +2714,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c6a5dc426fcc25b99d91e4a283a8f5518339a0f63bf28588a6c5f31e089f8a" dependencies = [ - "base64 0.13.1", + "base64", "hyper", "hyper-rustls", "ring", @@ -3752,15 +2743,6 @@ dependencies = [ "windows-sys 0.42.0", ] -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - [[package]] name = "ipconfig" version = "0.3.0" @@ -3800,12 +2782,6 @@ dependencies = [ "either", ] -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - [[package]] name = "itoa" version = "1.0.2" @@ -3876,7 +2852,7 @@ version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09f4f04699947111ec1733e71778d763555737579e44b85844cae8e1940a1828" dependencies = [ - "base64 0.13.1", + "base64", "pem", "ring", "serde", @@ -3893,21 +2869,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - -[[package]] -name = "language-tags" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" - [[package]] name = "lazy_static" version = "1.4.0" @@ -3946,16 +2907,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] - [[package]] name = "libnghttp2-sys" version = "0.1.7+1.45.0" @@ -4015,31 +2966,13 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f" -[[package]] -name = "local-channel" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c" -dependencies = [ - "futures-core", - "futures-sink", - "futures-util", - "local-waker", -] - -[[package]] -name = "local-waker" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" - [[package]] name = "lock_api" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ - "autocfg 1.1.0", + "autocfg", "scopeguard", ] @@ -4050,23 +2983,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if 1.0.0", - "serde", - "value-bag", -] - -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if 1.0.0", - "generator", - "scoped-tls", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", ] [[package]] @@ -4159,7 +3075,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] [[package]] @@ -4168,7 +3084,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] [[package]] @@ -4210,7 +3126,7 @@ checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.36.1", ] @@ -4230,7 +3146,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a37fe10c1485a0cd603468e284a1a8535b4ecf46808f5f7de3639a1e1252dbf8" dependencies = [ "async-trait", - "base64 0.13.1", + "base64", "bitflags", "bson", "chrono", @@ -4246,10 +3162,10 @@ dependencies = [ "md-5", "pbkdf2", "percent-encoding", - "rand 0.8.5", + "rand", "rustc_version_runtime", "rustls", - "rustls-pemfile 1.0.1", + "rustls-pemfile", "serde", "serde_bytes", "serde_with", @@ -4262,61 +3178,20 @@ dependencies = [ "thiserror", "tokio", "tokio-rustls", - "tokio-util 0.7.3", - "trust-dns-proto", - "trust-dns-resolver", - "typed-builder", - "uuid 1.2.2", - "webpki-roots", -] - -[[package]] -name = "multer" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8f35e687561d5c1667590911e6698a8cb714a134a7505718a182e7bc9d3836" -dependencies = [ - "bytes 1.3.0", - "encoding_rs", - "futures-util", - "http 0.2.8", - "httparse", - "log", - "memchr", - "mime", - "spin 0.9.3", - "tokio", - "tokio-util 0.6.10", - "version_check", -] - -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" -dependencies = [ - "serde", -] - -[[package]] -name = "multipart" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00dec633863867f29cb39df64a397cdf4a6354708ddd7759f70c7fb51c5f9182" -dependencies = [ - "buf_redux", - "httparse", - "log", - "mime", - "mime_guess", - "quick-error", - "rand 0.8.5", - "safemem", - "tempfile", - "twoway", + "tokio-util", + "trust-dns-proto", + "trust-dns-resolver", + "typed-builder", + "uuid", + "webpki-roots", ] +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + [[package]] name = "native-tls" version = "0.2.10" @@ -4341,24 +3216,13 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi", -] - [[package]] name = "nix" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb" dependencies = [ - "autocfg 1.1.0", + "autocfg", "bitflags", "cfg-if 1.0.0", "libc", @@ -4392,7 +3256,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ - "autocfg 1.1.0", + "autocfg", "num-integer", "num-traits", ] @@ -4403,7 +3267,7 @@ version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "autocfg 1.1.0", + "autocfg", "num-traits", ] @@ -4413,7 +3277,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] [[package]] @@ -4505,9 +3369,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -4531,7 +3395,7 @@ version = "0.9.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" dependencies = [ - "autocfg 1.1.0", + "autocfg", "cc", "libc", "openssl-src", @@ -4556,8 +3420,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1edc79add46364183ece1a4542592ca593e6421c60807232f5b8f7a31703825d" dependencies = [ "async-trait", - "bytes 1.3.0", - "http 0.2.8", + "bytes", + "http", "opentelemetry_api", ] @@ -4570,7 +3434,7 @@ dependencies = [ "async-trait", "futures", "futures-util", - "http 0.2.8", + "http", "opentelemetry", "opentelemetry-proto", "prost", @@ -4605,7 +3469,7 @@ dependencies = [ "indexmap", "js-sys", "once_cell", - "pin-project-lite 0.2.9", + "pin-project-lite", "thiserror", ] @@ -4625,21 +3489,12 @@ dependencies = [ "once_cell", "opentelemetry_api", "percent-encoding", - "rand 0.8.5", + "rand", "thiserror", "tokio", "tokio-stream", ] -[[package]] -name = "ordered-float" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" -dependencies = [ - "num-traits", -] - [[package]] name = "os_info" version = "3.5.1" @@ -4672,12 +3527,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "parking" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" - [[package]] name = "parking_lot" version = "0.11.2" @@ -4747,36 +3596,13 @@ dependencies = [ "digest 0.10.3", ] -[[package]] -name = "pear" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e44241c5e4c868e3eaa78b7c1848cadd6344ed4f54d029832d32b415a58702" -dependencies = [ - "inlinable_string", - "pear_codegen", - "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.47", - "proc-macro2-diagnostics", - "quote 1.0.21", - "syn 1.0.104", -] - [[package]] name = "pem" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" dependencies = [ - "base64 0.13.1", + "base64", ] [[package]] @@ -4810,17 +3636,11 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - [[package]] name = "pin-project-lite" version = "0.2.9" @@ -4848,115 +3668,6 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" -[[package]] -name = "poem" -version = "1.3.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc88a96f338947991534ac756e28bd05665a7dd40ad9c0c143cc5503ef5635e8" -dependencies = [ - "async-trait", - "bytes 1.3.0", - "futures-util", - "headers", - "http 0.2.8", - "hyper", - "mime", - "parking_lot 0.12.1", - "percent-encoding", - "pin-project-lite 0.2.9", - "poem-derive", - "regex", - "rfc7239", - "serde", - "serde_json", - "serde_urlencoded", - "smallvec", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util 0.7.3", - "tracing", -] - -[[package]] -name = "poem-derive" -version = "1.3.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bfb3ddf3eb162c2a2dc4dbdc610eaf56417cd4000fcda2686ccb354e2a1b2b" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "poise" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca787e4e516076de1995a83ee05fbdfed71d072ea0da3df018318db42a87803" -dependencies = [ - "async-trait", - "derivative", - "futures-core", - "futures-util", - "log", - "once_cell", - "parking_lot 0.12.1", - "poise_macros", - "regex", - "serenity", - "tokio", -] - -[[package]] -name = "poise_macros" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b80c1f4e04114527f9d41ed6bb31707a095276f51bb0aef3ca11f062b25a67c4" -dependencies = [ - "darling 0.14.1", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "polling" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "log", - "wepoll-ffi", - "winapi", -] - -[[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 = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - [[package]] name = "portable-atomic" version = "0.3.15" @@ -4969,7 +3680,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" dependencies = [ - "rand 0.8.5", + "rand", ] [[package]] @@ -5023,18 +3734,8 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1516508b396cefe095485fdce673007422f5e48e82934b7b423dc26aa5e6a4" dependencies = [ - "proc-macro2 1.0.47", - "syn 1.0.104", -] - -[[package]] -name = "proc-macro-crate" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" -dependencies = [ - "thiserror", - "toml", + "proc-macro2", + "syn", ] [[package]] @@ -5044,9 +3745,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", "version_check", ] @@ -5056,26 +3757,11 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "version_check", ] -[[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" -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.47" @@ -5085,26 +3771,13 @@ dependencies = [ "unicode-ident", ] -[[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.47", - "quote 1.0.21", - "syn 1.0.104", - "version_check", - "yansi", -] - [[package]] name = "prost" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0841812012b2d4a6145fae9a6af1534873c32aa67fff26bd09f8fa42c83f95a" dependencies = [ - "bytes 1.3.0", + "bytes", "prost-derive", ] @@ -5114,7 +3787,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d8b442418ea0822409d9e7d047cbf1e7e9e1760b172bf9982cf29d517c93511" dependencies = [ - "bytes 1.3.0", + "bytes", "heck", "itertools", "lazy_static", @@ -5125,7 +3798,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 1.0.104", + "syn", "tempfile", "which", ] @@ -5138,9 +3811,9 @@ checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -5149,7 +3822,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e" dependencies = [ - "bytes 1.3.0", + "bytes", "prost", ] @@ -5174,54 +3847,13 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[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.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ - "proc-macro2 1.0.47", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.8", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift", - "winapi", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", + "proc-macro2", ] [[package]] @@ -5231,28 +3863,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -5262,31 +3874,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -5295,78 +3883,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.7", -] - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", + "getrandom", ] [[package]] @@ -5375,7 +3892,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core 0.6.3", + "rand_core", ] [[package]] @@ -5416,19 +3933,10 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ - "pem", - "ring", - "time 0.3.11", - "yasna", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", + "pem", + "ring", + "time", + "yasna", ] [[package]] @@ -5446,31 +3954,11 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.7", + "getrandom", "redox_syscall", "thiserror", ] -[[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.47", - "quote 1.0.21", - "syn 1.0.104", -] - [[package]] name = "regalloc2" version = "0.5.1" @@ -5524,13 +4012,13 @@ version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" dependencies = [ - "base64 0.13.1", - "bytes 1.3.0", + "base64", + "bytes", "encoding_rs", "futures-core", "futures-util", "h2", - "http 0.2.8", + "http", "http-body", "hyper", "hyper-rustls", @@ -5543,16 +4031,15 @@ dependencies = [ "native-tls", "once_cell", "percent-encoding", - "pin-project-lite 0.2.9", + "pin-project-lite", "rustls", - "rustls-pemfile 1.0.1", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", "tokio-rustls", - "tokio-util 0.7.3", "tower-service", "url", "wasm-bindgen", @@ -5570,7 +4057,7 @@ checksum = "4a1c03e9011a8c59716ad13115550469e081e2e9892656b0ba6a47c907921894" dependencies = [ "anyhow", "async-trait", - "http 0.2.8", + "http", "reqwest", "serde", "task-local-extensions", @@ -5587,7 +4074,7 @@ dependencies = [ "async-trait", "chrono", "futures", - "http 0.2.8", + "http", "hyper", "reqwest", "reqwest-middleware", @@ -5615,7 +4102,7 @@ checksum = "47f9e19b18c6cdd796cc70aea8a9ea5ee7b813be611c6589e3624fcdbfd05f9d" dependencies = [ "anyhow", "chrono", - "rand 0.8.5", + "rand", ] [[package]] @@ -5631,15 +4118,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "rfc7239" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "087317b3cf7eb481f13bd9025d729324b7cd068d6f470e2d76d049e191f5ba47" -dependencies = [ - "uncased", -] - [[package]] name = "ring" version = "0.16.20" @@ -5677,93 +4155,6 @@ dependencies = [ "serde", ] -[[package]] -name = "rocket" -version = "0.5.0-rc.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98ead083fce4a405feb349cf09abdf64471c6077f14e0ce59364aa90d4b99317" -dependencies = [ - "async-stream", - "async-trait", - "atomic", - "atty", - "binascii", - "bytes 1.3.0", - "either", - "figment", - "futures", - "indexmap", - "log", - "memchr", - "multer", - "num_cpus", - "parking_lot 0.12.1", - "pin-project-lite 0.2.9", - "rand 0.8.5", - "ref-cast", - "rocket_codegen", - "rocket_http", - "serde", - "state", - "tempfile", - "time 0.3.11", - "tokio", - "tokio-stream", - "tokio-util 0.7.3", - "ubyte", - "version_check", - "yansi", -] - -[[package]] -name = "rocket_codegen" -version = "0.5.0-rc.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6aeb6bb9c61e9cd2c00d70ea267bf36f76a4cc615e5908b349c2f9d93999b47" -dependencies = [ - "devise", - "glob", - "indexmap", - "proc-macro2 1.0.47", - "quote 1.0.21", - "rocket_http", - "syn 1.0.104", - "unicode-xid 0.2.3", -] - -[[package]] -name = "rocket_http" -version = "0.5.0-rc.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ded65d127954de3c12471630bf4b81a2792f065984461e65b91d0fdaafc17a2" -dependencies = [ - "cookie 0.16.0", - "either", - "futures", - "http 0.2.8", - "hyper", - "indexmap", - "log", - "memchr", - "pear", - "percent-encoding", - "pin-project-lite 0.2.9", - "ref-cast", - "serde", - "smallvec", - "stable-pattern", - "state", - "time 0.3.11", - "tokio", - "uncased", -] - -[[package]] -name = "route-recognizer" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56770675ebc04927ded3e60633437841581c285dc6236109ea25fbf3beb7b59e" - [[package]] name = "rustc-demangle" version = "0.1.21" @@ -5831,7 +4222,7 @@ dependencies = [ "bitflags", "errno", "io-lifetimes", - "itoa 1.0.2", + "itoa", "libc", "linux-raw-sys", "once_cell", @@ -5857,27 +4248,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.1", + "rustls-pemfile", "schannel", "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "rustls-pemfile" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" dependencies = [ - "base64 0.13.1", + "base64", ] [[package]] @@ -5908,77 +4290,6 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - -[[package]] -name = "salvo" -version = "0.37.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b290f01b3b881afd34408b5823cb44f6717ed6b93a6e16a0113e9a49645ea8a7" -dependencies = [ - "salvo_core", -] - -[[package]] -name = "salvo_core" -version = "0.37.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fea63014bacaaaef1eaa1f28d90921cfbbee73a379974fca30fc698f64a8853" -dependencies = [ - "async-compression", - "async-trait", - "base64 0.13.1", - "bytes 1.3.0", - "cookie 0.16.0", - "cruet", - "encoding_rs", - "enumflags2", - "fastrand", - "form_urlencoded", - "futures-util", - "headers", - "http 0.2.8", - "hyper", - "mime", - "mime_guess", - "multer", - "multimap", - "once_cell", - "parking_lot 0.12.1", - "percent-encoding", - "regex", - "salvo_macros", - "serde", - "serde_json", - "serde_urlencoded", - "tempfile", - "textnonce", - "thiserror", - "tokio", - "tokio-stream", - "tracing", - "url", -] - -[[package]] -name = "salvo_macros" -version = "0.37.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b305a54f28b92483eabbfc91dd39bba62c840095b5513e83d31582c7e6bd8d44" -dependencies = [ - "cruet", - "darling 0.14.1", - "proc-macro-crate", - "proc-macro2 1.0.47", - "quote 1.0.21", - "regex", - "syn 1.0.104", -] - [[package]] name = "same-file" version = "1.0.6" @@ -5998,12 +4309,6 @@ dependencies = [ "windows-sys 0.36.1", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "scopeguard" version = "1.1.0" @@ -6076,16 +4381,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" -dependencies = [ - "ordered-float", - "serde", -] - [[package]] name = "serde_bytes" version = "0.11.7" @@ -6101,18 +4396,9 @@ version = "1.0.148" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a55492425aa53521babf6137309e7d34c20bbfbbfcfe2c7f3a047fd1f6b92c0c" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "serde_fmt" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2963a69a2b3918c1dc75a45a18bd3fcd1120e31d3f59deb1b2f9b5d5ffb8baa4" -dependencies = [ - "serde", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -6131,7 +4417,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "indexmap", - "itoa 1.0.2", + "itoa", "ryu", "serde", ] @@ -6145,17 +4431,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_urlencoded" version = "0.7.1" @@ -6163,7 +4438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.2", + "itoa", "ryu", "serde", ] @@ -6184,42 +4459,10 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ - "darling 0.13.4", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "serenity" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fd5e7b5858ad96e99d440138f34f5b98e1b959ebcd3a1036203b30e78eb788" -dependencies = [ - "async-trait", - "async-tungstenite", - "base64 0.13.1", - "bitflags", - "bytes 1.3.0", - "cfg-if 1.0.0", - "chrono", - "dashmap", - "flate2", - "futures", - "mime", - "mime_guess", - "parking_lot 0.12.1", - "percent-encoding", - "reqwest", - "rustversion", - "serde", - "serde-value", - "serde_json", - "time 0.3.11", - "tokio", - "tracing", - "typemap_rev", - "url", + "darling", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -6233,15 +4476,6 @@ dependencies = [ "digest 0.10.3", ] -[[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.4" @@ -6253,12 +4487,6 @@ dependencies = [ "digest 0.10.3", ] -[[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.9.9" @@ -6334,11 +4562,11 @@ dependencies = [ "axum-extra 0.5.0", "axum-sessions", "clap 4.0.27", - "http 0.2.8", + "http", "hyper", "jsonwebtoken", "opentelemetry", - "rand 0.8.5", + "rand", "ring", "serde", "serde_json", @@ -6359,9 +4587,9 @@ version = "0.11.0" dependencies = [ "pretty_assertions", "proc-macro-error", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", "trybuild", ] @@ -6372,14 +4600,14 @@ dependencies = [ "anyhow", "async-trait", "axum", - "base64 0.13.1", - "bytes 1.3.0", + "base64", + "bytes", "cap-std", "chrono", "comfy-table", "crossterm", "headers", - "http 0.2.8", + "http", "http-body", "http-serde", "hyper", @@ -6407,7 +4635,7 @@ dependencies = [ "tracing-opentelemetry", "tracing-subscriber", "ttl_cache", - "uuid 1.2.2", + "uuid", ] [[package]] @@ -6417,7 +4645,7 @@ dependencies = [ "anyhow", "async-trait", "axum", - "bytes 1.3.0", + "bytes", "cargo", "cargo_metadata", "chrono", @@ -6436,7 +4664,7 @@ dependencies = [ "opentelemetry-http", "pipe", "portpicker", - "rand 0.8.5", + "rand", "serde", "serde_json", "shuttle-common", @@ -6455,7 +4683,7 @@ dependencies = [ "tracing", "tracing-opentelemetry", "tracing-subscriber", - "uuid 1.2.2", + "uuid", ] [[package]] @@ -6467,14 +4695,14 @@ dependencies = [ "async-trait", "axum", "axum-server", - "base64 0.13.1", + "base64", "bollard", "chrono", "clap 4.0.27", "colored", "fqdn", "futures", - "http 0.2.8", + "http", "hyper", "hyper-reverse-proxy 0.5.2-dev (git+https://github.com/chesedo/hyper-reverse-proxy?branch=bug/host_header)", "instant-acme", @@ -6487,11 +4715,11 @@ dependencies = [ "pem", "pin-project", "portpicker", - "rand 0.8.5", + "rand", "rcgen", "ring", "rustls", - "rustls-pemfile 1.0.1", + "rustls-pemfile", "serde", "serde_json", "shuttle-common", @@ -6506,7 +4734,7 @@ dependencies = [ "tracing-opentelemetry", "tracing-subscriber", "ttl_cache", - "uuid 1.2.2", + "uuid", ] [[package]] @@ -6515,7 +4743,7 @@ version = "0.8.0" dependencies = [ "axum", "futures-executor", - "http 0.2.8", + "http", "rmp-serde", "shuttle-codegen", "shuttle-common", @@ -6537,7 +4765,7 @@ dependencies = [ "tonic", "tonic-build", "tracing", - "uuid 1.2.2", + "uuid", ] [[package]] @@ -6553,7 +4781,7 @@ dependencies = [ "once_cell", "portpicker", "prost", - "rand 0.8.5", + "rand", "serde_json", "shuttle-common", "shuttle-proto", @@ -6580,12 +4808,11 @@ dependencies = [ "hyper", "portpicker", "rmp-serde", - "rocket", "serde_json", "shuttle-common", "shuttle-proto", - "shuttle-secrets", "shuttle-service", + "strfmt", "thiserror", "tokio", "tokio-stream", @@ -6593,7 +4820,7 @@ dependencies = [ "tower", "tracing", "tracing-subscriber", - "uuid 1.2.2", + "uuid", "wasi-common", "wasmtime", "wasmtime-wasi", @@ -6611,40 +4838,20 @@ dependencies = [ name = "shuttle-service" version = "0.11.0" dependencies = [ - "actix-web", "anyhow", - "async-std", "async-trait", "axum", - "bincode", "cargo", "cargo_metadata", "crossbeam-channel", - "futures", - "hyper", - "libloading", - "num_cpus", "pipe", - "poem", - "poise", - "portpicker", - "rocket", - "salvo", "serde_json", - "serenity", "shuttle-codegen", "shuttle-common", - "sqlx", "strfmt", "thiserror", - "thruster", - "tide", "tokio", - "tower", "tracing", - "tracing-subscriber", - "uuid 1.2.2", - "warp", ] [[package]] @@ -6677,15 +4884,6 @@ dependencies = [ "libc", ] -[[package]] -name = "simple-mutex" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38aabbeafa6f6dead8cebf246fe9fae1f9215c8d29b3a69f93bd62a9e4a3dcd6" -dependencies = [ - "event-listener", -] - [[package]] name = "simple_asn1" version = "0.6.2" @@ -6695,7 +4893,7 @@ dependencies = [ "num-bigint", "num-traits", "thiserror", - "time 0.3.11", + "time", ] [[package]] @@ -6732,7 +4930,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" dependencies = [ - "autocfg 1.1.0", + "autocfg", "serde", "static_assertions", "version_check", @@ -6813,10 +5011,10 @@ checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105" dependencies = [ "ahash", "atoi", - "base64 0.13.1", + "base64", "bitflags", "byteorder", - "bytes 1.3.0", + "bytes", "chrono", "crc", "crossbeam-queue", @@ -6832,10 +5030,10 @@ dependencies = [ "futures-util", "hashlink", "hex 0.4.3", - "hkdf 0.12.3", + "hkdf", "hmac 0.12.1", "indexmap", - "itoa 1.0.2", + "itoa", "libc", "libsqlite3-sys", "log", @@ -6844,10 +5042,10 @@ dependencies = [ "once_cell", "paste", "percent-encoding", - "rand 0.8.5", + "rand", "serde", "serde_json", - "sha1 0.10.4", + "sha1", "sha2 0.10.2", "smallvec", "sqlformat", @@ -6856,7 +5054,7 @@ dependencies = [ "thiserror", "tokio-stream", "url", - "uuid 1.2.2", + "uuid", "whoami", ] @@ -6867,118 +5065,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b850fa514dc11f2ee85be9d055c512aa866746adfacd1cb42d867d68e6a5b0d9" dependencies = [ "dotenvy", - "either", - "heck", - "once_cell", - "proc-macro2 1.0.47", - "quote 1.0.21", - "serde_json", - "sha2 0.10.2", - "sqlx-core", - "sqlx-rt", - "syn 1.0.104", - "url", -] - -[[package]] -name = "sqlx-rt" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396" -dependencies = [ - "native-tls", - "once_cell", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "stable-pattern" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4564168c00635f88eaed410d5efa8131afa8d8699a612c80c455a0ba05c21045" -dependencies = [ - "memchr", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - -[[package]] -name = "state" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe866e1e51e8260c9eed836a042a5e7f6726bb2b411dffeaa712e19c388f23b" -dependencies = [ - "loom", -] - -[[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", + "either", + "heck", + "once_cell", + "proc-macro2", + "quote", + "serde_json", + "sha2 0.10.2", + "sqlx-core", + "sqlx-rt", + "syn", + "url", ] [[package]] -name = "stdweb-derive" -version = "0.5.3" +name = "sqlx-rt" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "serde", - "serde_derive", - "syn 1.0.104", + "native-tls", + "once_cell", + "tokio", + "tokio-native-tls", ] [[package]] -name = "stdweb-internal-macros" -version = "0.2.9" +name = "stable_deref_trait" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2 1.0.47", - "quote 1.0.21", - "serde", - "serde_derive", - "serde_json", - "sha1 0.6.1", - "syn 1.0.104", -] +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strfmt" @@ -7027,10 +5149,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4faebde00e8ff94316c01800f9054fd2ba77d30d9e922541913051d1d978918b" dependencies = [ "heck", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "rustversion", - "syn 1.0.104", + "syn", ] [[package]] @@ -7049,34 +5171,14 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" -[[package]] -name = "sval" -version = "1.0.0-alpha.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45f6ee7c7b87caf59549e9fe45d6a69c75c8019e79e212a835c5da0e92f0ba08" -dependencies = [ - "serde", -] - -[[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.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "unicode-ident", ] @@ -7147,15 +5249,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "templatify" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a528032d6917c9a80cf894d9feeffe34056e8d62d3492bbfc15abfdcfa8a8fe1" -dependencies = [ - "bytes 0.4.12", -] - [[package]] name = "termcolor" version = "1.1.3" @@ -7208,18 +5301,8 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8901a55b0a7a06ebc4a674dcca925170da8e613fa3b163a1df804ed10afb154d" dependencies = [ - "quote 1.0.21", - "syn 1.0.104", -] - -[[package]] -name = "textnonce" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f8d70cd784ed1dc33106a18998d77758d281dc40dc3e6d050cf0f5286683" -dependencies = [ - "base64 0.12.3", - "rand 0.7.3", + "quote", + "syn", ] [[package]] @@ -7243,9 +5326,9 @@ version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -7257,121 +5340,16 @@ dependencies = [ "once_cell", ] -[[package]] -name = "thruster" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910effe6fa8063f44f9f2f4d15d758270a679562414235c6781bf3b606b72682" -dependencies = [ - "async-trait", - "bytes 0.5.6", - "bytes 1.3.0", - "fnv", - "futures", - "http 0.1.21", - "http 0.2.8", - "httparse", - "lazy_static", - "log", - "net2", - "num_cpus", - "paste", - "serde", - "serde_derive", - "serde_json", - "smallvec", - "socket2", - "templatify", - "thruster-proc", - "time 0.1.44", - "tokio", - "tokio-stream", - "tokio-util 0.6.10", -] - -[[package]] -name = "thruster-proc" -version = "1.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfac33b0a1b0be1aae8e3ca87005671eb2e33617661c20052c98709410d364f" -dependencies = [ - "lazy_static", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", - "uuid 0.7.4", -] - -[[package]] -name = "tide" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c459573f0dd2cc734b539047f57489ea875af8ee950860ded20cf93a79a1dee0" -dependencies = [ - "async-h1", - "async-session 2.0.1", - "async-sse", - "async-std", - "async-trait", - "femme", - "futures-util", - "http-client", - "http-types", - "kv-log-macro", - "log", - "pin-project-lite 0.2.9", - "route-recognizer", - "serde", - "serde_json", -] - -[[package]] -name = "time" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[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.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ - "itoa 1.0.2", + "itoa", "libc", "num_threads", - "serde", - "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", + "time-macros", ] [[package]] @@ -7380,19 +5358,6 @@ 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.47", - "quote 1.0.21", - "standback", - "syn 1.0.104", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -7410,22 +5375,22 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.22.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76ce4a75fb488c605c54bf610f221cea8b0dafb53333c1a67e8ee199dcd2ae3" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ - "autocfg 1.1.0", - "bytes 1.3.0", + "autocfg", + "bytes", "libc", "memchr", "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.9", + "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "winapi", + "windows-sys 0.45.0", ] [[package]] @@ -7434,7 +5399,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" dependencies = [ - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", ] @@ -7444,9 +5409,9 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -7477,7 +5442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" dependencies = [ "futures-core", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", ] @@ -7488,7 +5453,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53474327ae5e166530d17f2d956afcb4f8a004de581b3cae10f12006bc8163e3" dependencies = [ "async-stream", - "bytes 1.3.0", + "bytes", "futures-core", "tokio", "tokio-stream", @@ -7508,33 +5473,17 @@ dependencies = [ "tungstenite", ] -[[package]] -name = "tokio-util" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" -dependencies = [ - "bytes 1.3.0", - "futures-core", - "futures-io", - "futures-sink", - "log", - "pin-project-lite 0.2.9", - "slab", - "tokio", -] - [[package]] name = "tokio-util" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" dependencies = [ - "bytes 1.3.0", + "bytes", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", "tracing", ] @@ -7605,12 +5554,12 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.13.1", - "bytes 1.3.0", + "base64", + "bytes", "futures-core", "futures-util", "h2", - "http 0.2.8", + "http", "http-body", "hyper", "hyper-timeout", @@ -7620,7 +5569,7 @@ dependencies = [ "prost-derive", "tokio", "tokio-stream", - "tokio-util 0.7.3", + "tokio-util", "tower", "tower-layer", "tower-service", @@ -7635,10 +5584,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31fa2c5e870bdce133847d15e075333e6e1ca3fff913001fede6754f3060e367" dependencies = [ "prettyplease", - "proc-macro2 1.0.47", + "proc-macro2", "prost-build", - "quote 1.0.21", - "syn 1.0.104", + "quote", + "syn", ] [[package]] @@ -7651,11 +5600,11 @@ dependencies = [ "futures-util", "indexmap", "pin-project", - "pin-project-lite 0.2.9", - "rand 0.8.5", + "pin-project-lite", + "rand", "slab", "tokio", - "tokio-util 0.7.3", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -7668,13 +5617,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aba3f3efabf7fb41fae8534fc20a817013dd1c12cb45441efb6c82e6556b4cd8" dependencies = [ "bitflags", - "bytes 1.3.0", + "bytes", "futures-core", "futures-util", - "http 0.2.8", + "http", "http-body", "http-range-header", - "pin-project-lite 0.2.9", + "pin-project-lite", "tower-layer", "tower-service", ] @@ -7685,15 +5634,15 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ - "base64 0.13.1", + "base64", "bitflags", - "bytes 1.3.0", + "bytes", "futures-core", "futures-util", - "http 0.2.8", + "http", "http-body", "http-range-header", - "pin-project-lite 0.2.9", + "pin-project-lite", "tower", "tower-layer", "tower-service", @@ -7720,7 +5669,7 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", "log", - "pin-project-lite 0.2.9", + "pin-project-lite", "tracing-attributes", "tracing-core", ] @@ -7731,9 +5680,9 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -7827,7 +5776,7 @@ dependencies = [ "ipnet", "lazy_static", "log", - "rand 0.8.5", + "rand", "smallvec", "thiserror", "tinyvec", @@ -7891,29 +5840,18 @@ version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" dependencies = [ - "base64 0.13.1", + "base64", "byteorder", - "bytes 1.3.0", - "http 0.2.8", + "bytes", + "http", "httparse", "log", "native-tls", - "rand 0.8.5", - "rustls", + "rand", "sha-1", "thiserror", "url", "utf-8", - "webpki", -] - -[[package]] -name = "twoway" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" -dependencies = [ - "memchr", ] [[package]] @@ -7922,42 +5860,17 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89851716b67b937e393b3daa8423e67ddfc4bbbf1654bcf05488e95e0828db0c" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", ] -[[package]] -name = "typemap_rev" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5b74f0a24b5454580a79abb6994393b09adf0ab8070f15827cb666255de155" - [[package]] name = "typenum" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" -[[package]] -name = "ubyte" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a58e29f263341a29bb79e14ad7fda5f63b1c7e48929bad4c685d7876b1d04e94" -dependencies = [ - "serde", -] - -[[package]] -name = "uncased" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b01702b0fd0b3fadcf98e098780badda8742d4f4a7676615cad90e8ac73622" -dependencies = [ - "serde", - "version_check", -] - [[package]] name = "unicase" version = "2.6.0" @@ -8000,12 +5913,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" -[[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.3" @@ -8018,16 +5925,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "untrusted" version = "0.7.1" @@ -8040,7 +5937,7 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97acb4c28a254fd7a4aeec976c46a7fa404eac4d7c134b30c75144846d7cb8f" dependencies = [ - "base64 0.13.1", + "base64", "chunked_transfer", "log", "native-tls", @@ -8063,7 +5960,6 @@ dependencies = [ "form_urlencoded", "idna 0.3.0", "percent-encoding", - "serde", ] [[package]] @@ -8084,22 +5980,13 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372" -[[package]] -name = "uuid" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -dependencies = [ - "rand 0.6.5", -] - [[package]] name = "uuid" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ - "getrandom 0.2.7", + "getrandom", "serde", ] @@ -8109,20 +5996,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "value-bag" -version = "1.0.0-alpha.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "erased-serde", - "serde", - "serde_fmt", - "sval", - "version_check", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -8152,8 +6025,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d257817081c7dffcdbab24b9e62d2def62e2ff7d00b1c20062551e6cccc145ff" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", ] [[package]] @@ -8165,12 +6038,6 @@ dependencies = [ "libc", ] -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "walkdir" version = "2.3.2" @@ -8192,49 +6059,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "warp" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7b8be92646fc3d18b06147664ebc5f48d222686cb11a8755e561a735aacc6d" -dependencies = [ - "bytes 1.3.0", - "futures-channel", - "futures-util", - "headers", - "http 0.2.8", - "hyper", - "log", - "mime", - "mime_guess", - "multipart", - "percent-encoding", - "pin-project", - "rustls-pemfile 0.2.1", - "scoped-tls", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tokio-util 0.7.3", - "tower-service", - "tracing", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -8291,8 +6115,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" dependencies = [ "cfg-if 1.0.0", - "serde", - "serde_json", "wasm-bindgen-macro", ] @@ -8305,9 +6127,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-shared", ] @@ -8329,7 +6151,7 @@ version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa" dependencies = [ - "quote 1.0.21", + "quote", "wasm-bindgen-macro-support", ] @@ -8339,9 +6161,9 @@ version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -8418,7 +6240,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1e77abcf538af42517e188c109e4b50ecf6c0ee4d77ede76a438e0306b934dc" dependencies = [ "anyhow", - "base64 0.13.1", + "base64", "bincode", "directories-next", "file-per-thread-logger", @@ -8547,7 +6369,7 @@ dependencies = [ "memfd", "memoffset 0.6.5", "paste", - "rand 0.8.5", + "rand", "rustix", "wasmtime-asm-macros", "wasmtime-environ", @@ -8656,15 +6478,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - [[package]] name = "which" version = "4.4.0" @@ -8715,10 +6528,10 @@ checksum = "c15bf89e66bd1a9463ee529d37b999947befafd792f345d4a82e0d2b28c0845f" dependencies = [ "anyhow", "heck", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "shellexpand", - "syn 1.0.104", + "syn", "witx", ] @@ -8728,9 +6541,9 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "919fb8f106375c7f6daf7b388a1fea3e2092dedb273b17b2d917522917c07a3c" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.104", + "proc-macro2", + "quote", + "syn", "wiggle-generate", ] @@ -8785,19 +6598,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.1", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc 0.42.1", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" [[package]] name = "windows_aarch64_msvc" @@ -8807,9 +6644,9 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" [[package]] name = "windows_i686_gnu" @@ -8819,9 +6656,9 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" [[package]] name = "windows_i686_msvc" @@ -8831,9 +6668,9 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" [[package]] name = "windows_x86_64_gnu" @@ -8843,15 +6680,15 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" [[package]] name = "windows_x86_64_msvc" @@ -8861,9 +6698,9 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "winreg" @@ -8933,7 +6770,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346d34a236c9d3e5f3b9b74563f238f955bbd05fa0b8b4efa53c130c43982f4c" dependencies = [ - "time 0.3.11", + "time", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index a0e9be6ae..ad2d9a375 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,8 @@ exclude = [ "resources/persist", "resources/secrets", "resources/shared-db", - "resources/static-folder" + "resources/static-folder", + "services" ] [workspace.package] diff --git a/codegen/src/shuttle_main/mod.rs b/codegen/src/shuttle_main/mod.rs index 97ca75813..7476811d9 100644 --- a/codegen/src/shuttle_main/mod.rs +++ b/codegen/src/shuttle_main/mod.rs @@ -37,7 +37,7 @@ struct Input { /// The identifier for a resource input ident: Ident, - /// The shuttle_service builder for this resource + /// The shuttle_runtime builder for this resource builder: Builder, } @@ -134,9 +134,9 @@ fn check_return_type(signature: Signature) -> Option { ReturnType::Default => { emit_error!( signature, - "shuttle_service::main functions need to return a service"; + "shuttle_runtime::main functions need to return a service"; hint = "See the docs for services with first class support"; - doc = "https://docs.rs/shuttle-service/latest/shuttle_service/attr.main.html#shuttle-supported-services" + doc = "https://docs.rs/shuttle-service/latest/shuttle_runtime/attr.main.html#shuttle-supported-services" ); None } @@ -145,9 +145,9 @@ fn check_return_type(signature: Signature) -> Option { _ => { emit_error!( r#type, - "shuttle_service::main functions need to return a first class service or 'Result"; + "shuttle_runtime::main functions need to return a first class service or 'Result"; hint = "See the docs for services with first class support"; - doc = "https://docs.rs/shuttle-service/latest/shuttle_service/attr.main.html#shuttle-supported-services" + doc = "https://docs.rs/shuttle-service/latest/shuttle_runtime/attr.main.html#shuttle-supported-services" ); None } @@ -204,7 +204,7 @@ impl ToTokens for Loader { lit: Lit::Str(str), .. }) => { needs_vars = true; - quote!(&shuttle_service::strfmt(#str, &vars)?) + quote!(&shuttle_runtime::strfmt(#str, &vars)?) } other => quote!(#other), }; @@ -226,7 +226,7 @@ impl ToTokens for Loader { None } else { Some(parse_quote!( - use shuttle_service::ResourceBuilder; + use shuttle_runtime::ResourceBuilder; )) }; @@ -243,16 +243,16 @@ impl ToTokens for Loader { mut #factory_ident: shuttle_runtime::ProvisionerFactory, logger: shuttle_runtime::Logger, ) -> #return_type { - use shuttle_service::Context; - use shuttle_service::tracing_subscriber::prelude::*; + use shuttle_runtime::Context; + use shuttle_runtime::tracing_subscriber::prelude::*; #extra_imports let filter_layer = - shuttle_service::tracing_subscriber::EnvFilter::try_from_default_env() - .or_else(|_| shuttle_service::tracing_subscriber::EnvFilter::try_new("INFO")) + shuttle_runtime::tracing_subscriber::EnvFilter::try_from_default_env() + .or_else(|_| shuttle_runtime::tracing_subscriber::EnvFilter::try_new("INFO")) .unwrap(); - shuttle_service::tracing_subscriber::registry() + shuttle_runtime::tracing_subscriber::registry() .with(filter_layer) .with(logger) .init(); @@ -303,15 +303,15 @@ mod tests { mut _factory: shuttle_runtime::ProvisionerFactory, logger: shuttle_runtime::Logger, ) -> ShuttleSimple { - use shuttle_service::Context; - use shuttle_service::tracing_subscriber::prelude::*; + use shuttle_runtime::Context; + use shuttle_runtime::tracing_subscriber::prelude::*; let filter_layer = - shuttle_service::tracing_subscriber::EnvFilter::try_from_default_env() - .or_else(|_| shuttle_service::tracing_subscriber::EnvFilter::try_new("INFO")) + shuttle_runtime::tracing_subscriber::EnvFilter::try_from_default_env() + .or_else(|_| shuttle_runtime::tracing_subscriber::EnvFilter::try_new("INFO")) .unwrap(); - shuttle_service::tracing_subscriber::registry() + shuttle_runtime::tracing_subscriber::registry() .with(filter_layer) .with(logger) .init(); @@ -383,16 +383,16 @@ mod tests { mut factory: shuttle_runtime::ProvisionerFactory, logger: shuttle_runtime::Logger, ) -> ShuttleComplex { - use shuttle_service::Context; - use shuttle_service::tracing_subscriber::prelude::*; - use shuttle_service::ResourceBuilder; + use shuttle_runtime::Context; + use shuttle_runtime::tracing_subscriber::prelude::*; + use shuttle_runtime::ResourceBuilder; let filter_layer = - shuttle_service::tracing_subscriber::EnvFilter::try_from_default_env() - .or_else(|_| shuttle_service::tracing_subscriber::EnvFilter::try_new("INFO")) + shuttle_runtime::tracing_subscriber::EnvFilter::try_from_default_env() + .or_else(|_| shuttle_runtime::tracing_subscriber::EnvFilter::try_new("INFO")) .unwrap(); - shuttle_service::tracing_subscriber::registry() + shuttle_runtime::tracing_subscriber::registry() .with(filter_layer) .with(logger) .init(); @@ -498,22 +498,22 @@ mod tests { mut factory: shuttle_runtime::ProvisionerFactory, logger: shuttle_runtime::Logger, ) -> ShuttleComplex { - use shuttle_service::Context; - use shuttle_service::tracing_subscriber::prelude::*; - use shuttle_service::ResourceBuilder; + use shuttle_runtime::Context; + use shuttle_runtime::tracing_subscriber::prelude::*; + use shuttle_runtime::ResourceBuilder; let filter_layer = - shuttle_service::tracing_subscriber::EnvFilter::try_from_default_env() - .or_else(|_| shuttle_service::tracing_subscriber::EnvFilter::try_new("INFO")) + shuttle_runtime::tracing_subscriber::EnvFilter::try_from_default_env() + .or_else(|_| shuttle_runtime::tracing_subscriber::EnvFilter::try_new("INFO")) .unwrap(); - shuttle_service::tracing_subscriber::registry() + shuttle_runtime::tracing_subscriber::registry() .with(filter_layer) .with(logger) .init(); let vars = std::collections::HashMap::from_iter(factory.get_secrets().await?.into_iter().map(|(key, value)| (format!("secrets.{}", key), value))); - let pool = shuttle_shared_db::Postgres::new().size(&shuttle_service::strfmt("10Gb", &vars)?).public(false).build(&mut factory).await.context(format!("failed to provision {}", stringify!(shuttle_shared_db::Postgres)))?; + let pool = shuttle_shared_db::Postgres::new().size(&shuttle_runtime::strfmt("10Gb", &vars)?).public(false).build(&mut factory).await.context(format!("failed to provision {}", stringify!(shuttle_shared_db::Postgres)))?; complex(pool).await } diff --git a/deployer/tests/deploy_layer/bind-panic/Cargo.toml b/deployer/tests/deploy_layer/bind-panic/Cargo.toml index 5c476820e..5475a549c 100644 --- a/deployer/tests/deploy_layer/bind-panic/Cargo.toml +++ b/deployer/tests/deploy_layer/bind-panic/Cargo.toml @@ -8,6 +8,5 @@ edition = "2021" [workspace] [dependencies] -shuttle-service = { path = "../../../../service" } shuttle-runtime = { path = "../../../../runtime" } tokio = "1.22" diff --git a/deployer/tests/deploy_layer/bind-panic/src/main.rs b/deployer/tests/deploy_layer/bind-panic/src/main.rs index b8ccf9c3b..d7badcd69 100644 --- a/deployer/tests/deploy_layer/bind-panic/src/main.rs +++ b/deployer/tests/deploy_layer/bind-panic/src/main.rs @@ -1,15 +1,13 @@ -use shuttle_service::Service; - struct MyService; -#[shuttle_service::async_trait] -impl Service for MyService { - async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_service::Error> { +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for MyService { + async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_runtime::Error> { panic!("panic in bind"); } } -#[shuttle_service::main] -async fn bind_panic() -> Result { +#[shuttle_runtime::main] +async fn bind_panic() -> Result { Ok(MyService) } diff --git a/deployer/tests/deploy_layer/main-panic/Cargo.toml b/deployer/tests/deploy_layer/main-panic/Cargo.toml index 157965845..9e068f31d 100644 --- a/deployer/tests/deploy_layer/main-panic/Cargo.toml +++ b/deployer/tests/deploy_layer/main-panic/Cargo.toml @@ -8,6 +8,5 @@ edition = "2021" [workspace] [dependencies] -shuttle-service = { path = "../../../../service" } shuttle-runtime = { path = "../../../../runtime" } tokio = "1.22" diff --git a/deployer/tests/deploy_layer/main-panic/src/main.rs b/deployer/tests/deploy_layer/main-panic/src/main.rs index 4186a4508..fcb8bce0b 100644 --- a/deployer/tests/deploy_layer/main-panic/src/main.rs +++ b/deployer/tests/deploy_layer/main-panic/src/main.rs @@ -1,15 +1,13 @@ -use shuttle_service::Service; - struct MyService; -#[shuttle_service::async_trait] -impl Service for MyService { - async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_service::Error> { +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for MyService { + async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_runtime::Error> { Ok(()) } } -#[shuttle_service::main] -async fn main_panic() -> Result { +#[shuttle_runtime::main] +async fn main_panic() -> Result { panic!("main panic") } diff --git a/deployer/tests/deploy_layer/self-stop/Cargo.toml b/deployer/tests/deploy_layer/self-stop/Cargo.toml index 170cd3670..f740b87b7 100644 --- a/deployer/tests/deploy_layer/self-stop/Cargo.toml +++ b/deployer/tests/deploy_layer/self-stop/Cargo.toml @@ -8,6 +8,5 @@ edition = "2021" [workspace] [dependencies] -shuttle-service = { path = "../../../../service" } shuttle-runtime = { path = "../../../../runtime" } tokio = "1.22" diff --git a/deployer/tests/deploy_layer/self-stop/src/main.rs b/deployer/tests/deploy_layer/self-stop/src/main.rs index 8ba075244..9150538b5 100644 --- a/deployer/tests/deploy_layer/self-stop/src/main.rs +++ b/deployer/tests/deploy_layer/self-stop/src/main.rs @@ -1,15 +1,13 @@ -use shuttle_service::Service; - struct MyService; -#[shuttle_service::async_trait] -impl Service for MyService { - async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_service::error::Error> { +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for MyService { + async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_runtime::Error> { Ok(()) } } -#[shuttle_service::main] +#[shuttle_runtime::main] async fn self_stop() -> Result { Ok(MyService) } diff --git a/deployer/tests/deploy_layer/sleep-async/Cargo.toml b/deployer/tests/deploy_layer/sleep-async/Cargo.toml index 3d6e1e4ad..edd2ea6bc 100644 --- a/deployer/tests/deploy_layer/sleep-async/Cargo.toml +++ b/deployer/tests/deploy_layer/sleep-async/Cargo.toml @@ -8,6 +8,5 @@ edition = "2021" [workspace] [dependencies] -shuttle-service = { path = "../../../../service" } shuttle-runtime = { path = "../../../../runtime" } tokio = { version = "1.0", features = ["time"]} diff --git a/deployer/tests/deploy_layer/sleep-async/src/main.rs b/deployer/tests/deploy_layer/sleep-async/src/main.rs index 1322552d1..aead71b2d 100644 --- a/deployer/tests/deploy_layer/sleep-async/src/main.rs +++ b/deployer/tests/deploy_layer/sleep-async/src/main.rs @@ -1,20 +1,20 @@ use std::time::Duration; -use shuttle_service::Service; +use shuttle_runtime::Service; use tokio::time::sleep; struct SleepService { duration: u64, } -#[shuttle_service::main] -async fn simple() -> Result { +#[shuttle_runtime::main] +async fn simple() -> Result { Ok(SleepService { duration: 4 }) } -#[shuttle_service::async_trait] +#[shuttle_runtime::async_trait] impl Service for SleepService { - async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_service::error::Error> { + async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_runtime::Error> { let duration = Duration::from_secs(self.duration); sleep(duration).await; diff --git a/deployer/tests/resources/bind-panic/Cargo.toml b/deployer/tests/resources/bind-panic/Cargo.toml index 894f3ca8e..d20e3c071 100644 --- a/deployer/tests/resources/bind-panic/Cargo.toml +++ b/deployer/tests/resources/bind-panic/Cargo.toml @@ -9,6 +9,5 @@ edition = "2021" [workspace] [dependencies] -shuttle-service = { path = "../../../../service" } shuttle-runtime = { path = "../../../../runtime" } tokio = "1.22" diff --git a/deployer/tests/resources/bind-panic/src/main.rs b/deployer/tests/resources/bind-panic/src/main.rs index b8ccf9c3b..d7badcd69 100644 --- a/deployer/tests/resources/bind-panic/src/main.rs +++ b/deployer/tests/resources/bind-panic/src/main.rs @@ -1,15 +1,13 @@ -use shuttle_service::Service; - struct MyService; -#[shuttle_service::async_trait] -impl Service for MyService { - async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_service::Error> { +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for MyService { + async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_runtime::Error> { panic!("panic in bind"); } } -#[shuttle_service::main] -async fn bind_panic() -> Result { +#[shuttle_runtime::main] +async fn bind_panic() -> Result { Ok(MyService) } diff --git a/deployer/tests/resources/main-panic/Cargo.toml b/deployer/tests/resources/main-panic/Cargo.toml index 157965845..9e068f31d 100644 --- a/deployer/tests/resources/main-panic/Cargo.toml +++ b/deployer/tests/resources/main-panic/Cargo.toml @@ -8,6 +8,5 @@ edition = "2021" [workspace] [dependencies] -shuttle-service = { path = "../../../../service" } shuttle-runtime = { path = "../../../../runtime" } tokio = "1.22" diff --git a/deployer/tests/resources/main-panic/src/main.rs b/deployer/tests/resources/main-panic/src/main.rs index 4186a4508..fcb8bce0b 100644 --- a/deployer/tests/resources/main-panic/src/main.rs +++ b/deployer/tests/resources/main-panic/src/main.rs @@ -1,15 +1,13 @@ -use shuttle_service::Service; - struct MyService; -#[shuttle_service::async_trait] -impl Service for MyService { - async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_service::Error> { +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for MyService { + async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_runtime::Error> { Ok(()) } } -#[shuttle_service::main] -async fn main_panic() -> Result { +#[shuttle_runtime::main] +async fn main_panic() -> Result { panic!("main panic") } diff --git a/deployer/tests/resources/sleep-async/Cargo.toml b/deployer/tests/resources/sleep-async/Cargo.toml index 3d6e1e4ad..edd2ea6bc 100644 --- a/deployer/tests/resources/sleep-async/Cargo.toml +++ b/deployer/tests/resources/sleep-async/Cargo.toml @@ -8,6 +8,5 @@ edition = "2021" [workspace] [dependencies] -shuttle-service = { path = "../../../../service" } shuttle-runtime = { path = "../../../../runtime" } tokio = { version = "1.0", features = ["time"]} diff --git a/deployer/tests/resources/sleep-async/src/main.rs b/deployer/tests/resources/sleep-async/src/main.rs index 1322552d1..aead71b2d 100644 --- a/deployer/tests/resources/sleep-async/src/main.rs +++ b/deployer/tests/resources/sleep-async/src/main.rs @@ -1,20 +1,20 @@ use std::time::Duration; -use shuttle_service::Service; +use shuttle_runtime::Service; use tokio::time::sleep; struct SleepService { duration: u64, } -#[shuttle_service::main] -async fn simple() -> Result { +#[shuttle_runtime::main] +async fn simple() -> Result { Ok(SleepService { duration: 4 }) } -#[shuttle_service::async_trait] +#[shuttle_runtime::async_trait] impl Service for SleepService { - async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_service::error::Error> { + async fn bind(mut self, _: std::net::SocketAddr) -> Result<(), shuttle_runtime::Error> { let duration = Duration::from_secs(self.duration); sleep(duration).await; diff --git a/deployer/tests/resources/tests-fail/Cargo.toml b/deployer/tests/resources/tests-fail/Cargo.toml index ae2a76515..12a8c2a5d 100644 --- a/deployer/tests/resources/tests-fail/Cargo.toml +++ b/deployer/tests/resources/tests-fail/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" [dependencies] rocket = "0.5.0-rc.2" -shuttle-service = { path = "../../../../service", features = ["web-rocket"] } +shuttle-rocket = { path = "../../../../services/shuttle-rocket"} shuttle-runtime = { path = "../../../../runtime" } tokio = "1.22" diff --git a/deployer/tests/resources/tests-fail/src/main.rs b/deployer/tests/resources/tests-fail/src/main.rs index 85efb0bd3..ccb32383c 100644 --- a/deployer/tests/resources/tests-fail/src/main.rs +++ b/deployer/tests/resources/tests-fail/src/main.rs @@ -6,10 +6,10 @@ fn index() -> &'static str { "Hello, world!" } -#[shuttle_service::main] -async fn rocket() -> shuttle_service::ShuttleRocket { +#[shuttle_runtime::main] +async fn rocket() -> shuttle_rocket::ShuttleRocket { let rocket = rocket::build().mount("/hello", routes![index]); - Ok(rocket) + Ok(rocket.into()) } #[cfg(test)] diff --git a/deployer/tests/resources/tests-pass/Cargo.toml b/deployer/tests/resources/tests-pass/Cargo.toml index ffbd29a9f..e9d19b127 100644 --- a/deployer/tests/resources/tests-pass/Cargo.toml +++ b/deployer/tests/resources/tests-pass/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" [dependencies] rocket = "0.5.0-rc.2" -shuttle-service = { path = "../../../../service", features = ["web-rocket"] } +shuttle-rocket = { path = "../../../../services/shuttle-rocket"} shuttle-runtime = { path = "../../../../runtime" } tokio = "1.22" diff --git a/deployer/tests/resources/tests-pass/src/main.rs b/deployer/tests/resources/tests-pass/src/main.rs index 2f4525283..08e124e91 100644 --- a/deployer/tests/resources/tests-pass/src/main.rs +++ b/deployer/tests/resources/tests-pass/src/main.rs @@ -6,10 +6,10 @@ fn index() -> &'static str { "Hello, world!" } -#[shuttle_service::main] -async fn rocket() -> shuttle_service::ShuttleRocket { +#[shuttle_runtime::main] +async fn rocket() -> shuttle_rocket::ShuttleRocket { let rocket = rocket::build().mount("/hello", routes![index]); - Ok(rocket) + Ok(rocket.into()) } #[cfg(test)] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 60f768767..6ab22e9c3 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -16,6 +16,7 @@ async-trait = { workspace = true } chrono = { workspace = true } clap ={ version = "4.0.18", features = ["derive"] } serde_json = { workspace = true } +strfmt = "0.2.2" thiserror = { workspace = true } tokio = { version = "1.22.0", features = ["full"] } tokio-stream = "0.1.11" @@ -51,4 +52,15 @@ portpicker = "0.1.1" futures = { version = "0.3.25" } [features] -next = ["cap-std", "futures", "hyper/server", "rmp-serde", "futures", "wasi-common", "wasmtime", "wasmtime-wasi", "shuttle-common/wasm"] +default = [] +next = [ + "cap-std", + "futures", + "hyper/server", + "rmp-serde", + "futures", + "wasi-common", + "wasmtime", + "wasmtime-wasi", + "shuttle-common/wasm" +] diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 233616493..573a3c6f8 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -4,10 +4,17 @@ mod logger; mod next; mod provisioner_factory; +pub use async_trait::async_trait; pub use legacy::{start, Legacy}; pub use logger::Logger; #[cfg(feature = "next")] pub use next::{AxumWasm, NextArgs}; pub use provisioner_factory::ProvisionerFactory; pub use shuttle_common::storage_manager::StorageManager; -pub use shuttle_service::{main, Error, Service}; +pub use shuttle_service::{main, CustomError, Error, ResourceBuilder, Service}; + +// Dependencies required by the codegen +pub use anyhow::Context; +pub use strfmt::strfmt; +pub use tracing; +pub use tracing_subscriber; diff --git a/service/Cargo.toml b/service/Cargo.toml index 4940fe30d..c895c042e 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -11,42 +11,19 @@ homepage = "https://www.shuttle.rs" doctest = false [dependencies] -actix-web = { version = "4.2.1", optional = true } anyhow = { workspace = true } async-trait = { workspace = true } axum = { workspace = true, optional = true } -bincode = { version = "1.3.3", optional = true } # TODO: debug the libgit2-sys conflict with cargo-edit when upgrading cargo to 0.66 cargo = { version = "0.65.0", optional = true } cargo_metadata = "0.15.2" crossbeam-channel = "0.5.6" -futures = { version = "0.3.25", features = ["std"] } -hyper = { workspace = true, features = ["server", "tcp", "http1"], optional = true } -libloading = { version = "0.7.4", optional = true } -num_cpus = { version = "1.14.0", optional = true } pipe = "0.4.0" -poem = { version = "1.3.49", optional = true } -poise = { version = "0.5.2", optional = true } -rocket = { version = "0.5.0-rc.2", optional = true } -salvo = { version = "0.37.5", optional = true } serde_json = { workspace = true } -serenity = { version = "0.11.5", default-features = false, features = ["client", "gateway", "rustls_backend", "model"], optional = true } strfmt = "0.2.2" thiserror = { workspace = true } -thruster = { version = "1.3.0", optional = true } -tide = { version = "0.16.0", optional = true } -tokio = { version = "=1.22.0", features = ["sync"] } -tower = { workspace = true, features = ["make"], optional = true } +tokio = { version = "1.26.0", features = ["sync"] } tracing = { workspace = true } -tracing-subscriber = { workspace = true, features = ["env-filter"] } -warp = { version = "0.3.3", optional = true } - -# Tide does not have tokio support. So make sure async-std is compatible with tokio -# https://github.com/http-rs/tide/issues/791 -[dependencies.async-std] -version = "1.12.0" -optional = true -features = ["tokio1"] [dependencies.shuttle-codegen] workspace = true @@ -57,26 +34,10 @@ workspace = true features = ["tracing", "service"] [dev-dependencies] -portpicker = { workspace = true } -sqlx = { version = "0.6.2", features = ["runtime-tokio-native-tls", "postgres"] } -tokio = { version = "1.22.0", features = ["macros"] } -uuid = { workspace = true, features = ["v4"] } +tokio = { version = "1.26.0", features = ["macros", "rt"] } [features] default = ["codegen"] codegen = ["shuttle-codegen/frameworks"] builder = ["cargo"] - -web-actix-web = ["actix-web", "num_cpus"] -web-axum = ["axum"] -web-poem = ["poem"] -web-rocket = ["rocket"] -web-salvo = ["salvo"] -web-thruster = ["thruster"] -web-tide = ["tide", "async-std"] -web-tower = ["tower", "hyper"] -web-warp = ["warp"] - -bot-poise = ["poise"] -bot-serenity = ["serenity"] diff --git a/service/src/builder.rs b/service/src/builder.rs index 1d1358a8b..baf0082d8 100644 --- a/service/src/builder.rs +++ b/service/src/builder.rs @@ -4,15 +4,15 @@ use anyhow::{anyhow, bail, Context}; use cargo::core::compiler::{CompileKind, CompileMode, CompileTarget, MessageFormat}; use cargo::core::{Manifest, Shell, Summary, Verbosity, Workspace}; use cargo::ops::{clean, compile, CleanOptions, CompileOptions}; +use cargo::util::homedir; use cargo::util::interning::InternedString; -use cargo::util::{homedir, ToSemver}; use cargo::Config; use cargo_metadata::Message; use crossbeam_channel::Sender; use pipe::PipeWriter; use tracing::{error, trace}; -use crate::{NAME, NEXT_NAME, VERSION}; +use crate::NEXT_NAME; /// How to run/build the project pub enum Runtime { @@ -57,7 +57,6 @@ pub async fn build_crate( let is_next = is_next(summary); if !is_next { - check_version(summary)?; ensure_binary(current.manifest())?; } else { ensure_cdylib(current.manifest_mut())?; @@ -208,29 +207,6 @@ fn ensure_cdylib(manifest: &mut Manifest) -> anyhow::Result<()> { } } -/// Check that the crate being build is compatible with this version of loader -fn check_version(summary: &Summary) -> anyhow::Result<()> { - let valid_version = VERSION.to_semver().unwrap(); - - let version_req = if let Some(shuttle) = summary - .dependencies() - .iter() - .find(|dependency| dependency.package_name() == NAME) - { - shuttle.version_req() - } else { - return Err(anyhow!("this crate does not use the shuttle service")); - }; - - if version_req.matches(&valid_version) { - Ok(()) - } else { - Err(anyhow!( - "the version of `shuttle-service` specified as a dependency to this service ({version_req}) is not supported by this project instance ({valid_version}); try updating `shuttle-service` to '{valid_version}' or update the project instance using `cargo shuttle project rm` and `cargo shuttle project new`" - )) - } -} - /// Ensure `panic = "abort"` is not set: fn check_no_panic(ws: &Workspace) -> anyhow::Result<()> { if let Some(profiles) = ws.profiles() { diff --git a/service/src/lib.rs b/service/src/lib.rs index bd6be6537..030a4c9ae 100644 --- a/service/src/lib.rs +++ b/service/src/lib.rs @@ -213,16 +213,10 @@ use std::collections::BTreeMap; use std::net::SocketAddr; use std::path::PathBuf; -pub use async_trait::async_trait; - -// Pub uses by `codegen` -pub use anyhow::Context; -pub use strfmt::strfmt; -pub use tracing; -pub use tracing_subscriber; +use async_trait::async_trait; pub mod error; -pub use error::Error; +pub use error::{CustomError, Error}; pub use shuttle_common::database; @@ -395,209 +389,4 @@ pub trait Service: Send { async fn bind(mut self, addr: SocketAddr) -> Result<(), error::Error>; } -#[cfg(feature = "web-rocket")] -#[async_trait] -impl Service for rocket::Rocket { - async fn bind(mut self, addr: SocketAddr) -> Result<(), error::Error> { - let shutdown = rocket::config::Shutdown { - ctrlc: false, - ..rocket::config::Shutdown::default() - }; - - let config = self - .figment() - .clone() - .merge((rocket::Config::ADDRESS, addr.ip())) - .merge((rocket::Config::PORT, addr.port())) - .merge((rocket::Config::LOG_LEVEL, rocket::config::LogLevel::Off)) - .merge((rocket::Config::SHUTDOWN, shutdown)); - - let _rocket = self - .configure(config) - .launch() - .await - .map_err(error::CustomError::new)?; - - Ok(()) - } -} - -#[cfg(feature = "web-rocket")] -pub type ShuttleRocket = Result, Error>; - -#[cfg(feature = "web-poem")] -#[async_trait] -impl Service for T -where - T: poem::Endpoint + Sync + Send + 'static, -{ - async fn bind(mut self, addr: SocketAddr) -> Result<(), error::Error> { - poem::Server::new(poem::listener::TcpListener::bind(addr)) - .run(self) - .await - .map_err(error::CustomError::new)?; - - Ok(()) - } -} - -#[cfg(feature = "web-poem")] -pub type ShuttlePoem = Result; - -#[cfg(feature = "web-warp")] -#[async_trait] -impl Service for T -where - T: Send + Sync + Clone + 'static + warp::Filter, - T::Extract: warp::reply::Reply, -{ - async fn bind(mut self, addr: SocketAddr) -> Result<(), error::Error> { - warp::serve(*self).run(addr).await; - Ok(()) - } -} - -#[cfg(feature = "web-warp")] -pub type ShuttleWarp = Result, Error>; - -#[cfg(feature = "web-axum")] -#[async_trait] -impl Service for axum::Router { - async fn bind(mut self, addr: SocketAddr) -> Result<(), error::Error> { - axum::Server::bind(&addr) - .serve(self.into_make_service()) - .await - .map_err(error::CustomError::new)?; - - Ok(()) - } -} - -#[cfg(feature = "web-axum")] -pub type ShuttleAxum = Result; - -#[cfg(feature = "web-actix-web")] -#[async_trait] -impl Service for F -where - F: FnOnce(&mut actix_web::web::ServiceConfig) + Sync + Send + Clone + 'static, -{ - async fn bind(mut self, addr: SocketAddr) -> Result<(), Error> { - // Start a worker for each cpu, but no more than 4. - let worker_count = num_cpus::get().max(4); - - let srv = actix_web::HttpServer::new(move || actix_web::App::new().configure(self.clone())) - .workers(worker_count) - .bind(addr)? - .run(); - srv.await.map_err(error::CustomError::new)?; - - Ok(()) - } -} -#[cfg(feature = "web-actix-web")] -pub type ShuttleActixWeb = Result; - -#[cfg(feature = "web-salvo")] -#[async_trait] -impl Service for salvo::Router { - async fn bind(mut self, addr: SocketAddr) -> Result<(), error::Error> { - salvo::Server::new(salvo::listener::TcpListener::bind(addr)) - .serve(self) - .await; - - Ok(()) - } -} - -#[cfg(feature = "web-salvo")] -pub type ShuttleSalvo = Result; - -#[cfg(feature = "web-thruster")] -#[async_trait] -impl Service for T -where - T: thruster::ThrusterServer + Sync + Send + 'static, -{ - async fn bind(mut self, addr: SocketAddr) -> Result<(), error::Error> { - self.build(&addr.ip().to_string(), addr.port()).await; - - Ok(()) - } -} - -#[cfg(feature = "web-thruster")] -pub type ShuttleThruster = Result; - -#[cfg(feature = "web-tide")] -#[async_trait] -impl Service for tide::Server -where - T: Clone + Send + Sync + 'static, -{ - async fn bind(mut self, addr: SocketAddr) -> Result<(), error::Error> { - self.listen(addr).await.map_err(error::CustomError::new)?; - - Ok(()) - } -} - -#[cfg(feature = "web-tide")] -pub type ShuttleTide = Result, Error>; - -#[cfg(feature = "web-tower")] -#[async_trait] -impl Service for T -where - T: tower::Service, Response = hyper::Response> - + Clone - + Send - + Sync - + 'static, - T::Error: std::error::Error + Send + Sync, - T::Future: std::future::Future + Send + Sync, -{ - async fn bind(mut self, addr: SocketAddr) -> Result<(), error::Error> { - let shared = tower::make::Shared::new(self); - hyper::Server::bind(&addr) - .serve(shared) - .await - .map_err(error::CustomError::new)?; - - Ok(()) - } -} - -#[cfg(feature = "bot-serenity")] -#[async_trait] -impl Service for serenity::Client { - async fn bind(mut self, _addr: SocketAddr) -> Result<(), error::Error> { - self.start().await.map_err(error::CustomError::new)?; - - Ok(()) - } -} - -#[cfg(feature = "bot-serenity")] -pub type ShuttleSerenity = Result; - -#[cfg(feature = "bot-poise")] -#[async_trait] -impl Service for std::sync::Arc> -where - T: std::marker::Send + std::marker::Sync + 'static, - E: std::marker::Send + std::marker::Sync + 'static, -{ - async fn bind(mut self, _addr: SocketAddr) -> Result<(), error::Error> { - self.start().await.map_err(error::CustomError::new)?; - - Ok(()) - } -} - -#[cfg(feature = "bot-poise")] -pub type ShuttlePoise = Result>, Error>; - -pub const VERSION: &str = env!("CARGO_PKG_VERSION"); -pub const NAME: &str = env!("CARGO_PKG_NAME"); pub const NEXT_NAME: &str = "shuttle-next"; diff --git a/service/src/persist.rs b/service/src/persist.rs deleted file mode 100644 index adeebc263..000000000 --- a/service/src/persist.rs +++ /dev/null @@ -1,108 +0,0 @@ -use crate::{Factory, ResourceBuilder, ServiceName}; -use async_trait::async_trait; -use bincode::{deserialize_from, serialize_into, Error as BincodeError}; -use serde::de::DeserializeOwned; -use serde::Serialize; -use std::fs; -use std::fs::File; -use std::io::BufReader; -use std::io::BufWriter; -use std::path::PathBuf; -use thiserror::Error; - -#[derive(Error, Debug)] -pub enum PersistError { - #[error("failed to open file: {0}")] - Open(std::io::Error), - #[error("failed to create folder: {0}")] - CreateFolder(std::io::Error), - #[error("failed to serialize data: {0}")] - Serialize(BincodeError), - #[error("failed to deserialize data: {0}")] - Deserialize(BincodeError), -} - -pub struct Persist; - -pub struct PersistInstance { - service_name: ServiceName, -} - -impl PersistInstance { - pub fn save(&self, key: &str, struc: T) -> Result<(), PersistError> { - let storage_folder = self.get_storage_folder(); - fs::create_dir_all(storage_folder).map_err(PersistError::CreateFolder)?; - - let file_path = self.get_storage_file(key); - let file = File::create(file_path).map_err(PersistError::Open)?; - let mut writer = BufWriter::new(file); - Ok(serialize_into(&mut writer, &struc).map_err(PersistError::Serialize))? - } - - pub fn load(&self, key: &str) -> Result - where - T: DeserializeOwned, - { - let file_path = self.get_storage_file(key); - let file = File::open(file_path).map_err(PersistError::Open)?; - let reader = BufReader::new(file); - Ok(deserialize_from(reader).map_err(PersistError::Deserialize))? - } - - fn get_storage_folder(&self) -> PathBuf { - ["shuttle_persist", &self.service_name.to_string()] - .iter() - .collect() - } - - fn get_storage_file(&self, key: &str) -> PathBuf { - let mut path = self.get_storage_folder(); - path.push(format!("{key}.bin")); - - path - } -} - -#[async_trait] -impl ResourceBuilder for Persist { - fn new() -> Self { - Self {} - } - - async fn build(self, factory: &mut dyn Factory) -> Result { - Ok(PersistInstance { - service_name: factory.get_service_name(), - }) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use std::str::FromStr; - - #[test] - fn test_save_and_load() { - let persist = PersistInstance { - service_name: ServiceName::from_str("test").unwrap(), - }; - - persist.save("test", "test").unwrap(); - let result: String = persist.load("test").unwrap(); - assert_eq!(result, "test"); - } - - #[test] - fn test_load_error() { - let persist = PersistInstance { - service_name: ServiceName::from_str("test").unwrap(), - }; - - // unwrapp error - let result = persist.load::("error").unwrap_err(); - assert_eq!( - result.to_string(), - "failed to open file: No such file or directory (os error 2)" - ); - } -} diff --git a/service/tests/resources/is-bin/Cargo.toml b/service/tests/resources/is-bin/Cargo.toml index 52abbeab9..71680d565 100644 --- a/service/tests/resources/is-bin/Cargo.toml +++ b/service/tests/resources/is-bin/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" [dependencies] axum = "0.6.0" +shuttle-axum = { path = "../../../../services/shuttle-axum" } shuttle-runtime = { path = "../../../../runtime" } -shuttle-service = { path = "../../../", features = ["web-axum"] } tokio = { version = "1.22.0" } diff --git a/service/tests/resources/is-bin/src/main.rs b/service/tests/resources/is-bin/src/main.rs index 21ffd2090..19e9bd1a6 100644 --- a/service/tests/resources/is-bin/src/main.rs +++ b/service/tests/resources/is-bin/src/main.rs @@ -1,6 +1,6 @@ -#[shuttle_service::main] -async fn axum() -> shuttle_service::ShuttleAxum { +#[shuttle_runtime::main] +async fn axum() -> shuttle_axum::ShuttleAxum { let router = axum::Router::new(); - Ok(router) + Ok(router.into()) } diff --git a/service/tests/resources/not-bin/Cargo.toml b/service/tests/resources/not-bin/Cargo.toml index 8d34c0b74..6bef68b6f 100644 --- a/service/tests/resources/not-bin/Cargo.toml +++ b/service/tests/resources/not-bin/Cargo.toml @@ -10,5 +10,5 @@ crate-type = ["cdylib", "staticlib"] [dependencies] rocket = "0.5.0-rc.2" -shuttle-service = { path = "../../../", features = ["web-rocket"] } +shuttle-rocket = { path = "../../../../services/shuttle-rocket" } shuttle-runtime = { path = "../../../../runtime" } diff --git a/service/tests/resources/not-bin/src/lib.rs b/service/tests/resources/not-bin/src/lib.rs index 329aed72c..1c00c9ad3 100644 --- a/service/tests/resources/not-bin/src/lib.rs +++ b/service/tests/resources/not-bin/src/lib.rs @@ -1,7 +1,7 @@ // This will fail to compile since it's a library. -#[shuttle_service::main] -async fn rocket() -> shuttle_service::ShuttleRocket { +#[shuttle_runtime::main] +async fn rocket() -> shuttle_rocket::ShuttleRocket { let rocket = rocket::build(); - Ok(rocket) + Ok(rocket.into()) } diff --git a/service/tests/resources/not-shuttle/Cargo.toml b/service/tests/resources/not-shuttle/Cargo.toml index b951779af..ecd61ac3c 100644 --- a/service/tests/resources/not-shuttle/Cargo.toml +++ b/service/tests/resources/not-shuttle/Cargo.toml @@ -8,4 +8,4 @@ edition = "2021" [dependencies] axum = "0.6.0" shuttle-runtime = { path = "../../../../runtime" } -shuttle-service = { path = "../../../", features = ["web-axum"] } +shuttle-axum = { path = "../../../../services/shuttle-axum" } diff --git a/service/tests/resources/not-shuttle/src/main.rs b/service/tests/resources/not-shuttle/src/main.rs index 9cf9d865b..2edbe4d18 100644 --- a/service/tests/resources/not-shuttle/src/main.rs +++ b/service/tests/resources/not-shuttle/src/main.rs @@ -1,6 +1,6 @@ // This service cannot be hosted on shuttle since it is missing the runtime the shuttle main macro would have added!!! -async fn axum() -> shuttle_service::ShuttleAxum { +async fn axum() -> shuttle_axum::ShuttleAxum { let router = axum::Router::new(); - Ok(router) + Ok(router.into()) } diff --git a/services/README.md b/services/README.md new file mode 100644 index 000000000..39272e508 --- /dev/null +++ b/services/README.md @@ -0,0 +1,5 @@ +## Service Integrations +The list of supported frameworks for shuttle is always growing. If you feel we are missing a framework you would like, then feel to create a feature request for your desired framework. + +## Writing your own service integration +Creating your own service integration is quite simple. You only need to implement the [`Service`](https://docs.rs/shuttle-service/latest/shuttle_service/trait.Service.html) trait for your framework. diff --git a/services/shuttle-actix-web/Cargo.toml b/services/shuttle-actix-web/Cargo.toml new file mode 100644 index 000000000..b80256c5c --- /dev/null +++ b/services/shuttle-actix-web/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "shuttle-actix-web" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +actix-web = { version = "4.3.1" } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } +num_cpus = "1.15.0" + +[dev-dependencies] +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } diff --git a/services/shuttle-actix-web/src/lib.rs b/services/shuttle-actix-web/src/lib.rs new file mode 100644 index 000000000..793edfc93 --- /dev/null +++ b/services/shuttle-actix-web/src/lib.rs @@ -0,0 +1,60 @@ +//! Shuttle service integration for the Actix Web framework. +//! ## Example +//! ```rust,no_run +//! use actix_web::{get, web::ServiceConfig}; +//! use shuttle_actix_web::ShuttleActixWeb; +//! +//! #[get("/hello")] +//! async fn hello_world() -> &'static str { +//! "Hello World!" +//! } +//! +//! #[shuttle_runtime::main] +//! async fn actix_web( +//! ) -> ShuttleActixWeb { +//! let config = move |cfg: &mut ServiceConfig| { +//! cfg.service(hello_world); +//! }; +//! +//! Ok(config.into()) +//! } +//! ``` +use std::net::SocketAddr; + +/// A wrapper type for a closure that returns an [actix_web::web::ServiceConfig] so we can implement +/// [shuttle_runtime::Service] for it. +#[derive(Clone)] +pub struct ActixWebService(pub F); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for ActixWebService +where + F: FnOnce(&mut actix_web::web::ServiceConfig) + Send + Clone + 'static, +{ + async fn bind(mut self, addr: SocketAddr) -> Result<(), shuttle_runtime::Error> { + // Start a worker for each cpu, but no more than 4. + let worker_count = num_cpus::get().min(4); + + let server = + actix_web::HttpServer::new(move || actix_web::App::new().configure(self.0.clone())) + .workers(worker_count) + .bind(addr)? + .run(); + + server.await.map_err(shuttle_runtime::CustomError::new)?; + + Ok(()) + } +} + +impl From for ActixWebService +where + F: FnOnce(&mut actix_web::web::ServiceConfig) + Send + Clone + 'static, +{ + fn from(service_config: F) -> Self { + Self(service_config) + } +} + +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttleActixWeb = Result, shuttle_runtime::Error>; diff --git a/services/shuttle-axum/Cargo.toml b/services/shuttle-axum/Cargo.toml new file mode 100644 index 000000000..dc7002c3d --- /dev/null +++ b/services/shuttle-axum/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "shuttle-axum" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +axum = { version = "0.6.10" } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } + +[dev-dependencies] +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } diff --git a/services/shuttle-axum/src/lib.rs b/services/shuttle-axum/src/lib.rs new file mode 100644 index 000000000..6ca9589ff --- /dev/null +++ b/services/shuttle-axum/src/lib.rs @@ -0,0 +1,43 @@ +//! Shuttle service integration for the Axum web framework. +//! ## Example +//! ```rust,no_run +//! use axum::{routing::get, Router}; +//! +//! async fn hello_world() -> &'static str { +//! "Hello, world!" +//! } +//! +//! #[shuttle_runtime::main] +//! async fn axum() -> shuttle_axum::ShuttleAxum { +//! let router = Router::new().route("/hello", get(hello_world)); +//! +//! Ok(router.into()) +//! } +//! ``` +use shuttle_runtime::{CustomError, Error}; +use std::net::SocketAddr; + +/// A wrapper type for [axum::Router] so we can implement [shuttle_runtime::Service] for it. +pub struct AxumService(pub axum::Router); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for AxumService { + /// Takes the router that is returned by the user in their [shuttle_runtime::main] function + /// and binds to an address passed in by shuttle. + async fn bind(mut self, addr: SocketAddr) -> Result<(), Error> { + axum::Server::bind(&addr) + .serve(self.0.into_make_service()) + .await + .map_err(CustomError::new)?; + + Ok(()) + } +} + +impl From for AxumService { + fn from(router: axum::Router) -> Self { + Self(router) + } +} +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttleAxum = Result; diff --git a/services/shuttle-poem/Cargo.toml b/services/shuttle-poem/Cargo.toml new file mode 100644 index 000000000..9b68f4cee --- /dev/null +++ b/services/shuttle-poem/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "shuttle-poem" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +poem = { version = "1.3.55" } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } + +[dev-dependencies] +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } diff --git a/services/shuttle-poem/src/lib.rs b/services/shuttle-poem/src/lib.rs new file mode 100644 index 000000000..4adef8782 --- /dev/null +++ b/services/shuttle-poem/src/lib.rs @@ -0,0 +1,49 @@ +//! Shuttle service integration for the Poem web framework. +//! ## Example +//! ```rust,no_run +//! use poem::{get, handler, Route}; +//! use shuttle_poem::ShuttlePoem; +//! +//! #[handler] +//! fn hello_world() -> &'static str { +//! "Hello, world!" +//! } +//! +//! #[shuttle_runtime::main] +//! async fn poem() -> ShuttlePoem { +//! let app = Route::new().at("/hello", get(hello_world)); +//! +//! Ok(app.into()) +//! } +//! +//! ``` + +/// A wrapper type for [poem::Endpoint] so we can implement [shuttle_runtime::Service] for it. +pub struct PoemService(pub T); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for PoemService +where + T: poem::Endpoint + Send + 'static, +{ + async fn bind(mut self, addr: std::net::SocketAddr) -> Result<(), shuttle_runtime::Error> { + poem::Server::new(poem::listener::TcpListener::bind(addr)) + .run(self.0) + .await + .map_err(shuttle_runtime::CustomError::new)?; + + Ok(()) + } +} + +impl From for PoemService +where + T: poem::Endpoint + Send + 'static, +{ + fn from(router: T) -> Self { + Self(router) + } +} + +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttlePoem = Result, shuttle_runtime::Error>; diff --git a/services/shuttle-poise/Cargo.toml b/services/shuttle-poise/Cargo.toml new file mode 100644 index 000000000..8f153217d --- /dev/null +++ b/services/shuttle-poise/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "shuttle-poise" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +poise = { version = "0.5.2" } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } + +[dev-dependencies] +shuttle-secrets = { path = "../../resources/secrets" } +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } diff --git a/services/shuttle-poise/src/lib.rs b/services/shuttle-poise/src/lib.rs new file mode 100644 index 000000000..fb88c86d5 --- /dev/null +++ b/services/shuttle-poise/src/lib.rs @@ -0,0 +1,76 @@ +//! Shuttle service integration for the Poise discord bot framework. +//! ## Example +//! ```rust,no_run +//! use shuttle_runtime::Context as _; +//! use poise::serenity_prelude as serenity; +//! use shuttle_secrets::SecretStore; +//! use shuttle_poise::ShuttlePoise; +//! +//! struct Data {} // User data, which is stored and accessible in all command invocations +//! type Error = Box; +//! type Context<'a> = poise::Context<'a, Data, Error>; +//! +//! /// Responds with "world!" +//! #[poise::command(slash_command)] +//! async fn hello(ctx: Context<'_>) -> Result<(), Error> { +//! ctx.say("world!").await?; +//! Ok(()) +//! } +//! +//! #[shuttle_runtime::main] +//! async fn poise(#[shuttle_secrets::Secrets] secret_store: SecretStore) -> ShuttlePoise { +//! // Get the discord token set in `Secrets.toml` +//! let discord_token = secret_store +//! .get("DISCORD_TOKEN") +//! .context("'DISCORD_TOKEN' was not found")?; +//! +//! let framework = poise::Framework::builder() +//! .options(poise::FrameworkOptions { +//! commands: vec![hello()], +//! ..Default::default() +//! }) +//! .token(discord_token) +//! .intents(serenity::GatewayIntents::non_privileged()) +//! .setup(|ctx, _ready, framework| { +//! Box::pin(async move { +//! poise::builtins::register_globally(ctx, &framework.options().commands).await?; +//! Ok(Data {}) +//! }) +//! }) +//! .build() +//! .await +//! .map_err(shuttle_runtime::CustomError::new)?; +//! +//! Ok(framework.into()) +//! } +//! ``` +use std::net::SocketAddr; +use std::sync::Arc; + +/// A wrapper type for [poise::Framework] so we can implement [shuttle_runtime::Service] for it. +pub struct PoiseService(pub Arc>); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for PoiseService +where + T: Send + Sync + 'static, + E: Send + Sync + 'static, +{ + async fn bind(mut self, _addr: SocketAddr) -> Result<(), shuttle_runtime::Error> { + self.0 + .start() + .await + .map_err(shuttle_runtime::CustomError::new)?; + + Ok(()) + } +} + +impl From>> for PoiseService { + fn from(framework: Arc>) -> Self { + Self(framework) + } +} + +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttlePoise = Result, shuttle_runtime::Error>; diff --git a/services/shuttle-rocket/Cargo.toml b/services/shuttle-rocket/Cargo.toml new file mode 100644 index 000000000..ac2337964 --- /dev/null +++ b/services/shuttle-rocket/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "shuttle-rocket" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +rocket = { version = "0.5.0-rc.2" } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } + +[dev-dependencies] +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } diff --git a/services/shuttle-rocket/src/lib.rs b/services/shuttle-rocket/src/lib.rs new file mode 100644 index 000000000..e891cec0f --- /dev/null +++ b/services/shuttle-rocket/src/lib.rs @@ -0,0 +1,63 @@ +//! Shuttle service integration for the Rocket web framework. +//! ## Example +//! ```rust,no_run +//! #[macro_use] +//! extern crate rocket; +//! +//! # fn main() { +//! #[get("/")] +//! fn index() -> &'static str { +//! "Hello, world!" +//! } +//! +//! #[shuttle_runtime::main] +//! async fn rocket() -> shuttle_rocket::ShuttleRocket { +//! let rocket = rocket::build().mount("/hello", routes![index]); +//! +//! Ok(rocket.into()) +//! } +//! # } +//! ``` +use std::net::SocketAddr; + +/// A wrapper type for [rocket::Rocket] so we can implement [shuttle_runtime::Service] for it. +pub struct RocketService(pub rocket::Rocket); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for RocketService { + /// Takes the router that is returned by the user in their [shuttle_runtime::main] function + /// and binds to an address passed in by shuttle. + async fn bind(mut self, addr: SocketAddr) -> Result<(), shuttle_runtime::Error> { + let shutdown = rocket::config::Shutdown { + ctrlc: false, + ..rocket::config::Shutdown::default() + }; + + let config = self + .0 + .figment() + .clone() + .merge((rocket::Config::ADDRESS, addr.ip())) + .merge((rocket::Config::PORT, addr.port())) + .merge((rocket::Config::LOG_LEVEL, rocket::config::LogLevel::Off)) + .merge((rocket::Config::SHUTDOWN, shutdown)); + + let _rocket = self + .0 + .configure(config) + .launch() + .await + .map_err(shuttle_runtime::CustomError::new)?; + + Ok(()) + } +} + +impl From> for RocketService { + fn from(router: rocket::Rocket) -> Self { + Self(router) + } +} + +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttleRocket = Result; diff --git a/services/shuttle-salvo/Cargo.toml b/services/shuttle-salvo/Cargo.toml new file mode 100644 index 000000000..4568225fe --- /dev/null +++ b/services/shuttle-salvo/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "shuttle-salvo" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +salvo = { version = "0.37.5" } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } + +[dev-dependencies] +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } diff --git a/services/shuttle-salvo/src/lib.rs b/services/shuttle-salvo/src/lib.rs new file mode 100644 index 000000000..a38d4ab28 --- /dev/null +++ b/services/shuttle-salvo/src/lib.rs @@ -0,0 +1,44 @@ +//! Shuttle service integration for the Salvo web framework. +//! ## Example +//! ```rust,no_run +//! use salvo::prelude::*; +//! +//! #[handler] +//! async fn hello_world(res: &mut Response) { +//! res.render(Text::Plain("Hello, world!")); +//! } +//! +//! #[shuttle_runtime::main] +//! async fn salvo() -> shuttle_salvo::ShuttleSalvo { +//! let router = Router::with_path("hello").get(hello_world); +//! +//! Ok(router.into()) +//! } +//! +//! ``` +use shuttle_runtime::Error; +use std::net::SocketAddr; + +/// A wrapper type for [salvo::Router] so we can implement [shuttle_runtime::Service] for it. +pub struct SalvoService(pub salvo::Router); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for SalvoService { + /// Takes the router that is returned by the user in their [shuttle_runtime::main] function + /// and binds to an address passed in by shuttle. + async fn bind(mut self, addr: SocketAddr) -> Result<(), Error> { + salvo::Server::new(salvo::listener::TcpListener::bind(addr)) + .serve(self.0) + .await; + + Ok(()) + } +} + +impl From for SalvoService { + fn from(router: salvo::Router) -> Self { + Self(router) + } +} +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttleSalvo = Result; diff --git a/services/shuttle-serenity/Cargo.toml b/services/shuttle-serenity/Cargo.toml new file mode 100644 index 000000000..c1e768f5a --- /dev/null +++ b/services/shuttle-serenity/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "shuttle-serenity" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +serenity = { version = "0.11.5", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } + +[dev-dependencies] +anyhow = "1.0.69" +shuttle-secrets = { path = "../../resources/secrets" } +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } +tracing = "0.1.37" diff --git a/services/shuttle-serenity/src/lib.rs b/services/shuttle-serenity/src/lib.rs new file mode 100644 index 000000000..c216b80f9 --- /dev/null +++ b/services/shuttle-serenity/src/lib.rs @@ -0,0 +1,76 @@ +//! Shuttle service integration for the Serenity discord bot framework. +//! ## Example +//! ```rust,no_run +//! use anyhow::anyhow; +//! use serenity::async_trait; +//! use serenity::model::channel::Message; +//! use serenity::model::gateway::Ready; +//! use serenity::prelude::*; +//! use shuttle_secrets::SecretStore; +//! use tracing::{error, info}; +//! +//! struct Bot; +//! +//! #[async_trait] +//! impl EventHandler for Bot { +//! async fn message(&self, ctx: Context, msg: Message) { +//! if msg.content == "!hello" { +//! if let Err(e) = msg.channel_id.say(&ctx.http, "world!").await { +//! error!("Error sending message: {:?}", e); +//! } +//! } +//! } +//! +//! async fn ready(&self, _: Context, ready: Ready) { +//! info!("{} is connected!", ready.user.name); +//! } +//! } +//! +//! #[shuttle_runtime::main] +//! async fn serenity( +//! #[shuttle_secrets::Secrets] secret_store: SecretStore, +//! ) -> shuttle_serenity::ShuttleSerenity { +//! // Get the discord token set in `Secrets.toml` +//! let token = if let Some(token) = secret_store.get("DISCORD_TOKEN") { +//! token +//! } else { +//! return Err(anyhow!("'DISCORD_TOKEN' was not found").into()); +//! }; +//! +//! // Set gateway intents, which decides what events the bot will be notified about +//! let intents = GatewayIntents::GUILD_MESSAGES | GatewayIntents::MESSAGE_CONTENT; +//! +//! let client = Client::builder(&token, intents) +//! .event_handler(Bot) +//! .await +//! .expect("Err creating client"); +//! +//! Ok(client.into()) +//! } +//! +//! ``` +use shuttle_runtime::{CustomError, Error}; +use std::net::SocketAddr; + +/// A wrapper type for [serenity::Client] so we can implement [shuttle_runtime::Service] for it. +pub struct SerenityService(pub serenity::Client); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for SerenityService { + /// Takes the client that is returned by the user in their [shuttle_runtime::main] function + /// and starts it. + async fn bind(mut self, _addr: SocketAddr) -> Result<(), Error> { + self.0.start().await.map_err(CustomError::new)?; + + Ok(()) + } +} + +impl From for SerenityService { + fn from(router: serenity::Client) -> Self { + Self(router) + } +} + +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttleSerenity = Result; diff --git a/services/shuttle-thruster/Cargo.toml b/services/shuttle-thruster/Cargo.toml new file mode 100644 index 000000000..af839c677 --- /dev/null +++ b/services/shuttle-thruster/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "shuttle-thruster" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +thruster = { version = "1.3.0" } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } + +[dev-dependencies] +thruster = { version = "1.3.0", features = ["hyper_server"] } +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } diff --git a/services/shuttle-thruster/src/lib.rs b/services/shuttle-thruster/src/lib.rs new file mode 100644 index 000000000..f642db1dd --- /dev/null +++ b/services/shuttle-thruster/src/lib.rs @@ -0,0 +1,53 @@ +//! Shuttle service integration for the Thruster web framework. +//! ## Example +//! ```rust,no_run +//! use thruster::{ +//! context::basic_hyper_context::{generate_context, BasicHyperContext as Ctx, HyperRequest}, +//! m, middleware_fn, App, HyperServer, MiddlewareNext, MiddlewareResult, ThrusterServer, +//! }; +//! +//! #[middleware_fn] +//! async fn hello(mut context: Ctx, _next: MiddlewareNext) -> MiddlewareResult { +//! context.body("Hello, World!"); +//! Ok(context) +//! } +//! +//! #[shuttle_runtime::main] +//! async fn thruster() -> shuttle_thruster::ShuttleThruster> { +//! let server = HyperServer::new( +//! App::::create(generate_context, ()).get("/hello", m![hello]), +//! ); +//! +//! Ok(server.into()) +//! } +//! ``` +use shuttle_runtime::Error; +use std::net::SocketAddr; + +/// A wrapper type for [thruster::ThrusterServer] so we can implement [shuttle_runtime::Service] for it. +pub struct ThrusterService(pub T); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for ThrusterService +where + T: thruster::ThrusterServer + Send + 'static, +{ + /// Takes the server that is returned by the user in their [shuttle_runtime::main] function + /// and binds to an address passed in by shuttle. + async fn bind(mut self, addr: SocketAddr) -> Result<(), Error> { + self.0.build(&addr.ip().to_string(), addr.port()).await; + + Ok(()) + } +} + +impl From for ThrusterService +where + T: thruster::ThrusterServer + Send + 'static, +{ + fn from(router: T) -> Self { + Self(router) + } +} +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttleThruster = Result, Error>; diff --git a/services/shuttle-tide/Cargo.toml b/services/shuttle-tide/Cargo.toml new file mode 100644 index 000000000..41ec5df63 --- /dev/null +++ b/services/shuttle-tide/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "shuttle-tide" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +tide = { version = "0.16.0" } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } + +# Tide does not have tokio support. So make sure async-std is compatible with tokio +# https://github.com/http-rs/tide/issues/791 +[dependencies.async-std] +version = "1.12.0" +features = ["tokio1"] + +[dev-dependencies] +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } diff --git a/services/shuttle-tide/src/lib.rs b/services/shuttle-tide/src/lib.rs new file mode 100644 index 000000000..c2ecb8807 --- /dev/null +++ b/services/shuttle-tide/src/lib.rs @@ -0,0 +1,40 @@ +//! Shuttle service integration for the Tide web framework. +//! ## Example +//! ```rust,no_run +//! #[shuttle_runtime::main] +//! async fn tide() -> shuttle_tide::ShuttleTide<()> { +//! let mut app = tide::new(); +//! app.with(tide::log::LogMiddleware::new()); +//! +//! app.at("/hello").get(|_| async { Ok("Hello, world!") }); +//! +//! Ok(app.into()) +//! } +//! ``` +use shuttle_runtime::{CustomError, Error}; +use std::net::SocketAddr; + +/// A wrapper type for [tide::Server(pub tide::Server); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for TideService +where + T: Clone + Send + Sync + 'static, +{ + /// Takes the router that is returned by the user in their [shuttle_runtime::main] function + /// and binds to an address passed in by shuttle. + async fn bind(mut self, addr: SocketAddr) -> Result<(), Error> { + self.0.listen(addr).await.map_err(CustomError::new)?; + + Ok(()) + } +} + +impl From> for TideService { + fn from(router: tide::Server) -> Self { + Self(router) + } +} +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttleTide = Result, Error>; diff --git a/services/shuttle-tower/Cargo.toml b/services/shuttle-tower/Cargo.toml new file mode 100644 index 000000000..162508255 --- /dev/null +++ b/services/shuttle-tower/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "shuttle-tower" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +hyper = { version = "0.14.23", features = ["server", "tcp", "http1"] } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } +tower = { version = "0.4.13", features = ["make"] } + +[dev-dependencies] +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } diff --git a/services/shuttle-tower/src/lib.rs b/services/shuttle-tower/src/lib.rs new file mode 100644 index 000000000..6c00610cc --- /dev/null +++ b/services/shuttle-tower/src/lib.rs @@ -0,0 +1,87 @@ +//! Shuttle service integration for the Tower framework. +//! ## Example +//! ```rust,no_run +//! use std::convert::Infallible; +//! use std::future::Future; +//! use std::pin::Pin; +//! use std::task::{Context, Poll}; +//! +//! #[derive(Clone)] +//! struct HelloWorld; +//! +//! impl tower::Service> for HelloWorld { +//! type Response = hyper::Response; +//! type Error = Infallible; +//! type Future = Pin> + Send + Sync>>; +//! +//! fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll> { +//! Poll::Ready(Ok(())) +//! } +//! +//! fn call(&mut self, _req: hyper::Request) -> Self::Future { +//! let body = hyper::Body::from("Hello, world!"); +//! let resp = hyper::Response::builder() +//! .status(200) +//! .body(body) +//! .expect("Unable to create the `hyper::Response` object"); +//! +//! let fut = async { Ok(resp) }; +//! +//! Box::pin(fut) +//! } +//! } +//! +//! #[shuttle_runtime::main] +//! async fn tower() -> shuttle_tower::ShuttleTower { +//! let service = HelloWorld; +//! +//! Ok(service.into()) +//! } +//! ``` +use shuttle_runtime::{CustomError, Error}; +use std::net::SocketAddr; + +/// A wrapper type for [tower::Service] so we can implement [shuttle_runtime::Service] for it. +pub struct TowerService(pub T); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for TowerService +where + T: tower::Service, Response = hyper::Response> + + Clone + + Send + + Sync + + 'static, + T::Error: std::error::Error + Send + Sync, + T::Future: std::future::Future + Send + Sync, +{ + /// Takes the service that is returned by the user in their [shuttle_runtime::main] function + /// and binds to an address passed in by shuttle. + async fn bind(mut self, addr: SocketAddr) -> Result<(), Error> { + let shared = tower::make::Shared::new(self.0); + hyper::Server::bind(&addr) + .serve(shared) + .await + .map_err(CustomError::new)?; + + Ok(()) + } +} + +impl From for TowerService +where + T: tower::Service, Response = hyper::Response> + + Clone + + Send + + Sync + + 'static, + T::Error: std::error::Error + Send + Sync, + T::Future: std::future::Future + Send + Sync, +{ + fn from(service: T) -> Self { + Self(service) + } +} + +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttleTower = Result, Error>; diff --git a/services/shuttle-warp/Cargo.toml b/services/shuttle-warp/Cargo.toml new file mode 100644 index 000000000..7953981a2 --- /dev/null +++ b/services/shuttle-warp/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "shuttle-warp" +version = "0.1.0" +edition = "2021" + +[workspace] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +warp = { version = "0.3.3" } +shuttle-runtime = { path = "../../runtime", version = "0.1.0" } + +[dev-dependencies] +tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } diff --git a/services/shuttle-warp/src/lib.rs b/services/shuttle-warp/src/lib.rs new file mode 100644 index 000000000..acaef062f --- /dev/null +++ b/services/shuttle-warp/src/lib.rs @@ -0,0 +1,53 @@ +//! Shuttle service integration for the Warp web framework. +//! ## Example +//! ```rust,no_run +//! use warp::Filter; +//! use warp::Reply; +//! +//! #[shuttle_runtime::main] +//! async fn warp() -> shuttle_warp::ShuttleWarp<(impl Reply,)> { +//! let route = warp::any().map(|| "Hello, World!"); +//! Ok(route.boxed().into()) +//! } +//! ``` +use shuttle_runtime::Error; +use std::net::SocketAddr; +use std::ops::Deref; + +/// A wrapper type for [warp::Filter] so we can implement [shuttle_runtime::Service] for it. +pub struct WarpService(pub T); + +#[shuttle_runtime::async_trait] +impl shuttle_runtime::Service for WarpService +where + T: Send + Sync + Clone + 'static + warp::Filter, + T::Extract: warp::reply::Reply, +{ + /// Takes the router that is returned by the user in their [shuttle_runtime::main] function + /// and binds to an address passed in by shuttle. + async fn bind(mut self, addr: SocketAddr) -> Result<(), Error> { + warp::serve((*self).clone()).run(addr).await; + Ok(()) + } +} + +impl From for WarpService +where + T: Send + Sync + Clone + 'static + warp::Filter, + T::Extract: warp::reply::Reply, +{ + fn from(router: T) -> Self { + Self(router) + } +} + +impl Deref for WarpService { + type Target = T; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +/// The return type that should be returned from the [shuttle_runtime::main] function. +pub type ShuttleWarp = Result>, Error>;