From da6b2ebf8b159e7db138db65f1bad07fafa763b6 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Mon, 25 Oct 2021 10:23:49 +0200 Subject: [PATCH] Update actix-rt --- Cargo.lock | 116 +++++++++++++++++++---- rust-code-analysis-web/Cargo.toml | 2 +- rust-code-analysis-web/src/web/server.rs | 4 +- 3 files changed, 98 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 196245eb1..cffe4d8e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,7 +14,7 @@ dependencies = [ "futures-sink", "log", "pin-project 0.4.28", - "tokio", + "tokio 0.2.25", "tokio-util", ] @@ -25,7 +25,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" dependencies = [ "actix-codec", - "actix-rt", + "actix-rt 1.1.1", "actix-service", "actix-utils", "derive_more", @@ -45,7 +45,7 @@ checksum = "5cb8958da437716f3f31b0e76f8daf36554128517d7df37ceba7df00f09622ee" dependencies = [ "actix-codec", "actix-connect", - "actix-rt", + "actix-rt 1.1.1", "actix-service", "actix-threadpool", "actix-utils", @@ -94,6 +94,16 @@ dependencies = [ "syn", ] +[[package]] +name = "actix-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "actix-router" version = "0.2.7" @@ -113,13 +123,24 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "143fcc2912e0d1de2bcf4e2f720d2a60c28652ab4179685a1ee159e0fb3db227" dependencies = [ - "actix-macros", + "actix-macros 0.1.3", "actix-threadpool", "copyless", "futures-channel", "futures-util", "smallvec", - "tokio", + "tokio 0.2.25", +] + +[[package]] +name = "actix-rt" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea360596a50aa9af459850737f99293e5cb9114ae831118cb6026b3bbc7583ad" +dependencies = [ + "actix-macros 0.2.3", + "futures-core", + "tokio 1.12.0", ] [[package]] @@ -129,13 +150,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" dependencies = [ "actix-codec", - "actix-rt", + "actix-rt 1.1.1", "actix-service", "actix-utils", "futures-channel", "futures-util", "log", - "mio", + "mio 0.6.23", "mio-uds", "num_cpus", "slab", @@ -158,8 +179,8 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c" dependencies = [ - "actix-macros", - "actix-rt", + "actix-macros 0.1.3", + "actix-rt 1.1.1", "actix-server", "actix-service", "log", @@ -200,7 +221,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" dependencies = [ "actix-codec", - "actix-rt", + "actix-rt 1.1.1", "actix-service", "bitflags", "bytes 0.5.6", @@ -221,9 +242,9 @@ checksum = "e641d4a172e7faa0862241a20ff4f1f5ab0ab7c279f00c2d4587b77483477b86" dependencies = [ "actix-codec", "actix-http", - "actix-macros", + "actix-macros 0.1.3", "actix-router", - "actix-rt", + "actix-rt 1.1.1", "actix-server", "actix-service", "actix-testing", @@ -341,7 +362,7 @@ checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691" dependencies = [ "actix-codec", "actix-http", - "actix-rt", + "actix-rt 1.1.1", "actix-service", "base64", "bytes 0.5.6", @@ -892,7 +913,7 @@ dependencies = [ "http", "indexmap", "slab", - "tokio", + "tokio 0.2.25", "tokio-util", "tracing", "tracing-futures", @@ -1130,12 +1151,25 @@ dependencies = [ "kernel32-sys", "libc", "log", - "miow", + "miow 0.2.2", "net2", "slab", "winapi 0.2.8", ] +[[package]] +name = "mio" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +dependencies = [ + "libc", + "log", + "miow 0.3.7", + "ntapi", + "winapi 0.3.9", +] + [[package]] name = "mio-uds" version = "0.6.8" @@ -1144,7 +1178,7 @@ checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" dependencies = [ "iovec", "libc", - "mio", + "mio 0.6.23", ] [[package]] @@ -1159,6 +1193,15 @@ dependencies = [ "ws2_32-sys", ] +[[package]] +name = "miow" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "net2" version = "0.2.37" @@ -1176,6 +1219,15 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "num" version = "0.4.0" @@ -1283,6 +1335,12 @@ dependencies = [ "libc", ] +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" + [[package]] name = "opaque-debug" version = "0.3.0" @@ -1588,7 +1646,7 @@ dependencies = [ name = "rust-code-analysis-web" version = "0.0.23" dependencies = [ - "actix-rt", + "actix-rt 2.3.0", "actix-web", "clap", "futures", @@ -1974,7 +2032,7 @@ dependencies = [ "lazy_static", "libc", "memchr", - "mio", + "mio 0.6.23", "mio-uds", "pin-project-lite 0.1.12", "signal-hook-registry", @@ -1982,6 +2040,22 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "tokio" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc" +dependencies = [ + "autocfg", + "libc", + "mio 0.7.14", + "once_cell", + "parking_lot", + "pin-project-lite 0.2.7", + "signal-hook-registry", + "winapi 0.3.9", +] + [[package]] name = "tokio-util" version = "0.3.1" @@ -1993,7 +2067,7 @@ dependencies = [ "futures-sink", "log", "pin-project-lite 0.1.12", - "tokio", + "tokio 0.2.25", ] [[package]] @@ -2156,7 +2230,7 @@ dependencies = [ "rand", "smallvec", "thiserror", - "tokio", + "tokio 0.2.25", "url", ] @@ -2175,7 +2249,7 @@ dependencies = [ "resolv-conf", "smallvec", "thiserror", - "tokio", + "tokio 0.2.25", "trust-dns-proto", ] diff --git a/rust-code-analysis-web/Cargo.toml b/rust-code-analysis-web/Cargo.toml index 62cd4e34c..0a3e58ea7 100644 --- a/rust-code-analysis-web/Cargo.toml +++ b/rust-code-analysis-web/Cargo.toml @@ -12,7 +12,7 @@ license = "MPL-2.0" name = "rust-code-analysis-web" [dependencies] -actix-rt = "^1.0" +actix-rt = "^2.3" actix-web = "^3.3" clap = "^2.33" futures = "^0.3" diff --git a/rust-code-analysis-web/src/web/server.rs b/rust-code-analysis-web/src/web/server.rs index eafba9624..77f4db012 100644 --- a/rust-code-analysis-web/src/web/server.rs +++ b/rust-code-analysis-web/src/web/server.rs @@ -220,8 +220,8 @@ fn ping() -> HttpResponse { } pub fn run(host: String, port: u16, n_threads: usize) -> std::io::Result<()> { - let _ = actix_rt::System::new("server"); - let mut rt = Runtime::new()?; + actix_rt::System::new().run()?; + let rt = Runtime::new()?; let max_size = 1024 * 1024 * 4; rt.block_on(async move {