From 561bd9a5ecd0cd7c5ff006dbdb59685a07432a27 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 24 May 2024 08:17:12 +0200 Subject: [PATCH] add back some tokio features --- src/tools/miri/test_dependencies/Cargo.lock | 10 ++++++++++ src/tools/miri/test_dependencies/Cargo.toml | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/tools/miri/test_dependencies/Cargo.lock b/src/tools/miri/test_dependencies/Cargo.lock index c73d13a4620c2..d534fdab2914e 100644 --- a/src/tools/miri/test_dependencies/Cargo.lock +++ b/src/tools/miri/test_dependencies/Cargo.lock @@ -253,6 +253,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + [[package]] name = "socket2" version = "0.5.7" @@ -297,6 +306,7 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", + "signal-hook-registry", "socket2", "tokio-macros", "windows-sys 0.48.0", diff --git a/src/tools/miri/test_dependencies/Cargo.toml b/src/tools/miri/test_dependencies/Cargo.toml index e40dd50a444da..ce11a8abb0ea9 100644 --- a/src/tools/miri/test_dependencies/Cargo.toml +++ b/src/tools/miri/test_dependencies/Cargo.toml @@ -18,7 +18,9 @@ getrandom_02 = { package = "getrandom", version = "0.2", features = ["js"] } [target.'cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))'.dependencies] tempfile = "3" page_size = "0.6" -tokio = { version = "1.24", features = ["macros", "rt-multi-thread", "time", "net"] } +# Avoid pulling in all of tokio's dependencies. +# However, without `net` and `signal`, tokio uses fewer relevant system APIs. +tokio = { version = "1.24", features = ["macros", "rt-multi-thread", "time", "net", "fs", "sync", "signal"] } [target.'cfg(windows)'.dependencies] windows-sys = { version = "0.52", features = [ "Win32_Foundation", "Win32_System_Threading" ] }