From ef23c604d78f53d91805bbefb06d2280a1f9d8d8 Mon Sep 17 00:00:00 2001 From: strawberry Date: Fri, 19 Apr 2024 23:39:28 -0400 Subject: [PATCH] bump axum-server-dual-protocol, remove 2 unnecessary attribute check Signed-off-by: strawberry --- Cargo.lock | 181 +++++++++++++--------------------------------------- Cargo.toml | 7 +- src/main.rs | 8 +-- 3 files changed, 49 insertions(+), 147 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2bed765f..a5de5d01 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -147,10 +147,10 @@ dependencies = [ "axum-core", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "http-body-util", - "hyper 1.3.1", + "hyper", "hyper-util", "itoa", "matchit", @@ -178,8 +178,8 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -200,8 +200,8 @@ dependencies = [ "bytes", "futures-util", "headers", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -211,26 +211,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "axum-server" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447f28c85900215cc1bea282f32d4a2f22d55c5a300afdfbc661c8d6a632e063" -dependencies = [ - "arc-swap", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "pin-project-lite", - "rustls 0.21.11", - "rustls-pemfile 1.0.4", - "tokio", - "tokio-rustls 0.24.1", - "tower-service", -] - [[package]] name = "axum-server" version = "0.6.0" @@ -240,14 +220,14 @@ dependencies = [ "arc-swap", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "http-body-util", - "hyper 1.3.1", + "hyper", "hyper-util", "pin-project-lite", "rustls 0.21.11", - "rustls-pemfile 2.1.2", + "rustls-pemfile", "tokio", "tokio-rustls 0.24.1", "tower", @@ -256,19 +236,20 @@ dependencies = [ [[package]] name = "axum-server-dual-protocol" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1a8f5076b5dbfeb706bcce30fe73caf20971e6e5ca80b83a7f1d990e73e185" +checksum = "7ea4cd08ae2a5f075d28fa31190163c8106a1d2d3189442494bae22b39040a0d" dependencies = [ - "axum-server 0.5.1", + "axum-server", "bytes", - "http 0.2.12", - "hyper 0.14.28", + "http", + "http-body-util", "pin-project", "tokio", "tokio-rustls 0.24.1", "tokio-util", "tower-layer", + "tower-service", ] [[package]] @@ -519,7 +500,7 @@ dependencies = [ "async-trait", "axum", "axum-extra", - "axum-server 0.6.0", + "axum-server", "axum-server-dual-protocol", "base64 0.22.0", "bytes", @@ -532,9 +513,9 @@ dependencies = [ "hardened_malloc-rs", "hickory-resolver", "hmac", - "http 1.1.0", + "http", "http-body-util", - "hyper 1.3.1", + "hyper", "hyper-util", "image", "ipaddress", @@ -998,25 +979,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.4" @@ -1028,7 +990,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 1.1.0", + "http", "indexmap", "slab", "tokio", @@ -1070,7 +1032,7 @@ dependencies = [ "base64 0.21.7", "bytes", "headers-core", - "http 1.1.0", + "http", "httpdate", "mime", "sha1", @@ -1082,7 +1044,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http 1.1.0", + "http", ] [[package]] @@ -1199,17 +1161,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.1.0" @@ -1221,17 +1172,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.0" @@ -1239,7 +1179,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "http 1.1.0", + "http", ] [[package]] @@ -1250,8 +1190,8 @@ checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" dependencies = [ "bytes", "futures-core", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "pin-project-lite", ] @@ -1267,30 +1207,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.3.1" @@ -1300,9 +1216,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.4", - "http 1.1.0", - "http-body 1.0.0", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -1319,8 +1235,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ "futures-util", - "http 1.1.0", - "hyper 1.3.1", + "http", + "hyper", "hyper-util", "rustls 0.22.4", "rustls-pki-types", @@ -1338,9 +1254,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", + "http", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -2333,10 +2249,10 @@ dependencies = [ "futures-core", "futures-util", "hickory-resolver", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "http-body-util", - "hyper 1.3.1", + "hyper", "hyper-rustls", "hyper-util", "ipnet", @@ -2348,7 +2264,7 @@ dependencies = [ "pin-project-lite", "rustls 0.22.4", "rustls-native-certs", - "rustls-pemfile 2.1.2", + "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", @@ -2433,7 +2349,7 @@ dependencies = [ "assign", "bytes", "date_header", - "http 1.1.0", + "http", "js_int", "js_option", "maplit", @@ -2455,7 +2371,7 @@ dependencies = [ "base64 0.21.7", "bytes", "form_urlencoded", - "http 1.1.0", + "http", "indexmap", "js_int", "konst", @@ -2680,21 +2596,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.2", + "rustls-pemfile", "rustls-pki-types", "schannel", "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - [[package]] name = "rustls-pemfile" version = "2.1.2" @@ -2902,7 +2809,7 @@ version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df141464944fdf8e2a6f2184eb1d973a20456466f788346b6e3a51791cdaa370" dependencies = [ - "http 1.1.0", + "http", "pin-project", "sentry-core", "tower-layer", @@ -3530,8 +3437,8 @@ dependencies = [ "bitflags 2.5.0", "bytes", "futures-core", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "http-body-util", "pin-project-lite", "tokio", diff --git a/Cargo.toml b/Cargo.toml index 95bfdc66..5fec2159 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -230,7 +230,7 @@ features = ["serde"] # to listen on both HTTP and HTTPS if listening on TLS dierctly from conduwuit for complement or sytest [dependencies.axum-server-dual-protocol] -version = "0.5.2" +version = "0.6" optional = true # used for conduit's CLI and admin room command parsing @@ -315,9 +315,10 @@ features = ["fs", "macros", "sync", "signal"] # *nix-specific dependencies [target.'cfg(unix)'.dependencies] nix = { version = "0.28.0", features = ["resource"] } -sd-notify = { version = "0.4.1", optional = true } # systemd is only available/relevant on *nix platforms +sd-notify = { version = "0.4.1", optional = true } # systemd is only available/relevant on *nix platforms -[target.'cfg(all(not(target_env = "msvc"), not(target_os = "macos"), target_os = "linux"))'.dependencies] + +[target.'cfg(all(not(target_env = "msvc"), target_os = "linux"))'.dependencies] hardened_malloc-rs = { version = "0.1", optional = true, features = [ "static", "clang", diff --git a/src/main.rs b/src/main.rs index 1d3b678f..44964970 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,13 +43,7 @@ mod routes; #[global_allocator] static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; -#[cfg(all( - not(target_env = "msvc"), - not(target_os = "macos"), - feature = "hardened_malloc", - target_os = "linux", - not(feature = "jemalloc") -))] +#[cfg(all(not(target_env = "msvc"), feature = "hardened_malloc", target_os = "linux", not(feature = "jemalloc")))] #[global_allocator] static GLOBAL: hardened_malloc_rs::HardenedMalloc = hardened_malloc_rs::HardenedMalloc;