From 310423eaea159c745d1bce9cd323417c70d58d07 Mon Sep 17 00:00:00 2001 From: Matt Yan Date: Tue, 19 Aug 2025 18:19:51 +0900 Subject: [PATCH] deps(tokio): bump minor ver; extract workspace dep; tree-shake features --- Cargo.lock | 82 +++++++++++------------------ Cargo.toml | 2 + examples/simple_ssr/Cargo.toml | 2 +- examples/ssr_router/Cargo.toml | 2 +- examples/wasi_ssr_module/Cargo.toml | 2 +- packages/yew/Cargo.toml | 6 +-- tools/benchmark-ssr/Cargo.toml | 2 +- tools/website-test/Cargo.toml | 2 +- 8 files changed, 41 insertions(+), 59 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b7177514a5e..3bfe6059a43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1502,7 +1502,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.8", "tokio", "tower-service", "tracing", @@ -1576,7 +1576,7 @@ dependencies = [ "http-body 1.0.1", "hyper 1.6.0", "pin-project-lite", - "socket2", + "socket2 0.5.8", "tokio", "tower-service", "tracing", @@ -1826,6 +1826,17 @@ dependencies = [ "web-sys", ] +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + [[package]] name = "ipnet" version = "2.11.0" @@ -1947,9 +1958,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.169" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libgit2-sys" @@ -2267,29 +2278,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - [[package]] name = "password_strength" version = "0.1.0" @@ -2571,15 +2559,6 @@ dependencies = [ "zerocopy 0.8.20", ] -[[package]] -name = "redox_syscall" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" -dependencies = [ - "bitflags", -] - [[package]] name = "regex" version = "1.11.1" @@ -2926,15 +2905,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[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 = "simple_ssr" version = "0.1.0" @@ -2978,6 +2948,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "spin" version = "0.9.8" @@ -3287,20 +3267,20 @@ dependencies = [ [[package]] name = "tokio" -version = "1.43.1" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "492a604e2fd7f814268a378409e6c92b5525d747d10db9a229723f55a417958c" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", - "parking_lot", "pin-project-lite", - "signal-hook-registry", - "socket2", + "slab", + "socket2 0.6.0", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f3b225a0be5..b24df844169 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,3 +28,5 @@ unexpected_cfgs = { level = "warn", check-cfg = [ "cfg(nightly_yew)", "cfg(wasm_bindgen_unstable_test_coverage)" ]} +[workspace.dependencies] +tokio = { version = "1.47.1" } diff --git a/examples/simple_ssr/Cargo.toml b/examples/simple_ssr/Cargo.toml index 766dd6bc5f3..28b524da456 100644 --- a/examples/simple_ssr/Cargo.toml +++ b/examples/simple_ssr/Cargo.toml @@ -26,7 +26,7 @@ wasm-logger = "0.2" log = "0.4" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -tokio = { version = "1.43.1", features = ["full"] } +tokio = { workspace = true, features = ["macros", "rt-multi-thread", "fs"] } warp = "0.3" clap = { version = "4", features = ["derive"] } diff --git a/examples/ssr_router/Cargo.toml b/examples/ssr_router/Cargo.toml index 2f14ac4a81d..db67d0f22ff 100644 --- a/examples/ssr_router/Cargo.toml +++ b/examples/ssr_router/Cargo.toml @@ -25,7 +25,7 @@ wasm-bindgen-futures = "0.4" wasm-logger = "0.2" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -tokio = { version = "1.43.1", features = ["full"] } +tokio = { workspace = true, features = ["macros", "rt-multi-thread", "net", "fs"] } axum = "0.8" tower = { version = "0.5", features = ["make"] } tower-http = { version = "0.6", features = ["fs"] } diff --git a/examples/wasi_ssr_module/Cargo.toml b/examples/wasi_ssr_module/Cargo.toml index bf1b0db59d9..03f673f5f77 100644 --- a/examples/wasi_ssr_module/Cargo.toml +++ b/examples/wasi_ssr_module/Cargo.toml @@ -14,4 +14,4 @@ serde = { version = "^1", features = ["derive"] } serde_json = "^1" lazy_static = "^1" -tokio = { version = "^1", features = ["macros", "rt", "time"] } +tokio = { workspace = true, features = ["macros", "rt", "time"] } diff --git a/packages/yew/Cargo.toml b/packages/yew/Cargo.toml index 389370dbedc..406cc6b1040 100644 --- a/packages/yew/Cargo.toml +++ b/packages/yew/Cargo.toml @@ -40,7 +40,7 @@ wasm-bindgen-futures = "0.4" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] # We still need tokio as we have docs linked to it. -tokio = { version = "1.43", features = ["rt"] } +tokio = { workspace = true, features = ["rt"] } [dependencies.web-sys] version = "^0.3.70" @@ -79,10 +79,10 @@ features = [ ] [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] -tokio = { version = "1.43", features = ["full"] } +tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros"] } [target.'cfg(all(target_arch = "wasm32", target_os = "wasi"))'.dependencies] -tokio = { version = "1.40", features = ["macros", "rt", "time"] } +tokio = { workspace = true, features = ["macros", "rt", "time"] } [dev-dependencies] wasm-bindgen-test = "0.3" diff --git a/tools/benchmark-ssr/Cargo.toml b/tools/benchmark-ssr/Cargo.toml index bfca0247a1b..7e7f58c5781 100644 --- a/tools/benchmark-ssr/Cargo.toml +++ b/tools/benchmark-ssr/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] yew = { path = "../../packages/yew", features = ["ssr"] } function_router = { path = "../../examples/function_router" } -tokio = { version = "1.43", features = ["full"] } +tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] } average = "0.15.1" tabled = "0.18.0" indicatif = "0.17.8" diff --git a/tools/website-test/Cargo.toml b/tools/website-test/Cargo.toml index 28baf7bb250..8d55e64c1ca 100644 --- a/tools/website-test/Cargo.toml +++ b/tools/website-test/Cargo.toml @@ -21,7 +21,7 @@ weblog = "0.3.0" yew = { path = "../../packages/yew/", features = ["ssr", "csr", "serde"] } yew-autoprops = "0.4.1" yew-router = { path = "../../packages/yew-router/" } -tokio = { version = "1.43.1", features = ["rt", "macros"] } +tokio = { workspace = true, features = ["rt", "macros"] } [dev-dependencies.web-sys] version = "0.3"