From af4a160a9c7d43253d0872cea2cf09b76a127bb3 Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Sat, 27 Dec 2025 01:03:49 +0800 Subject: [PATCH 1/3] [xitca-web] enable connection pool for compio bench --- frameworks/Rust/xitca-web/Cargo.lock | 247 +++++++++++++++---- frameworks/Rust/xitca-web/Cargo.toml | 25 +- frameworks/Rust/xitca-web/src/db_compio.rs | 79 ------ frameworks/Rust/xitca-web/src/db_pool.rs | 11 +- frameworks/Rust/xitca-web/src/main_compio.rs | 42 +++- 5 files changed, 250 insertions(+), 154 deletions(-) delete mode 100644 frameworks/Rust/xitca-web/src/db_compio.rs diff --git a/frameworks/Rust/xitca-web/Cargo.lock b/frameworks/Rust/xitca-web/Cargo.lock index e27c37eae05..26fe0f479ef 100755 --- a/frameworks/Rust/xitca-web/Cargo.lock +++ b/frameworks/Rust/xitca-web/Cargo.lock @@ -152,9 +152,9 @@ checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "cc" -version = "1.2.50" +version = "1.2.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c" +checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" dependencies = [ "find-msvc-tools", "shlex", @@ -218,7 +218,7 @@ dependencies = [ "paste", "polling", "slab", - "socket2", + "socket2 0.6.1", "windows-sys 0.61.2", ] @@ -274,7 +274,7 @@ dependencies = [ "either", "libc", "once_cell", - "socket2", + "socket2 0.6.1", "widestring", "windows-sys 0.61.2", ] @@ -298,7 +298,7 @@ dependencies = [ "pin-project-lite", "scoped-tls", "slab", - "socket2", + "socket2 0.6.1", "windows-sys 0.61.2", ] @@ -544,9 +544,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" +checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" [[package]] name = "flume" @@ -1478,10 +1478,11 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.7" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] @@ -1503,6 +1504,16 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "socket2" version = "0.6.1" @@ -1745,7 +1756,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.6.1", "tokio-macros", "windows-sys 0.61.2", ] @@ -1773,15 +1784,16 @@ dependencies = [ ] [[package]] -name = "tokio-uring" -version = "0.5.1" -source = "git+http://github.com/fakeshadow/tokio-uring?rev=c3d5887#c3d588793dc88cb05b57b982356b5e28bc73c192" +name = "tokio-uring-xitca" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51113468aadc91bb484bcd63c785c2ed2d50104d41d48039d0ac9ee25b6a6d4e" dependencies = [ "bytes", "io-uring", "libc", "slab", - "socket2", + "socket2 0.6.1", "tokio", ] @@ -1970,13 +1982,22 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets", + "windows-targets 0.53.5", ] [[package]] @@ -1988,6 +2009,22 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + [[package]] name = "windows-targets" version = "0.53.5" @@ -1995,58 +2032,106 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ "windows-link", - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + [[package]] name = "windows_aarch64_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_aarch64_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + [[package]] name = "windows_i686_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + [[package]] name = "windows_i686_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + [[package]] name = "windows_i686_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + [[package]] name = "windows_x86_64_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + [[package]] name = "windows_x86_64_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "windows_x86_64_msvc" version = "0.53.1" @@ -2068,7 +2153,7 @@ checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "xitca-codegen" version = "0.4.0" -source = "git+http://github.com/HFQR/xitca-web?rev=b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b#b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" +source = "git+http://github.com/HFQR/xitca-web?rev=00cdcc9#00cdcc9936eade36ca17b00b611ef2266a0ff106" dependencies = [ "quote", "syn", @@ -2077,7 +2162,29 @@ dependencies = [ [[package]] name = "xitca-http" version = "0.7.1" -source = "git+http://github.com/HFQR/xitca-web?rev=b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b#b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ebee6097494458ff127c1aaeb0c4fa4445406e7758b13e5423d561f252179fd" +dependencies = [ + "futures-core", + "http", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tracing", + "xitca-io 0.4.1", + "xitca-router", + "xitca-service", + "xitca-unsafe-collection", +] + +[[package]] +name = "xitca-http" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c2f7c6cf5f620802442b8c53c3d5f2097898a96443ec0da3af2df4cab16d3d" dependencies = [ "compio-buf", "compio-io", @@ -2088,11 +2195,10 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.6.1", "tokio", - "tokio-uring", "tracing", - "xitca-io", + "xitca-io 0.5.1", "xitca-router", "xitca-service", "xitca-unsafe-collection", @@ -2106,14 +2212,42 @@ checksum = "19b91b7a5ff9e3bed167b7e3bcc7b4462d2cb16d05e3ae913dbc384e463fdd7f" dependencies = [ "bytes", "tokio", - "tokio-uring", + "xitca-unsafe-collection", +] + +[[package]] +name = "xitca-io" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf2806223b57d14035c3ef09b02c2b15f5c16def43620353e5af8985ec94c40" +dependencies = [ + "bytes", + "tokio", + "tokio-uring-xitca", "xitca-unsafe-collection", ] [[package]] name = "xitca-postgres" version = "0.3.0" -source = "git+http://github.com/HFQR/xitca-web?rev=b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b#b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63a215cf0054b17dbc237c9cac91dab4d4d873a7e56ba8898d287472dc20dd32" +dependencies = [ + "fallible-iterator", + "futures-core", + "percent-encoding", + "postgres-protocol", + "postgres-types", + "tokio", + "tracing", + "xitca-io 0.4.1", + "xitca-unsafe-collection", +] + +[[package]] +name = "xitca-postgres" +version = "0.4.0" +source = "git+http://github.com/HFQR/xitca-web?rev=04a84e4#04a84e4eb477550446d1e10b365b7561e409cd84" dependencies = [ "compio", "fallible-iterator", @@ -2123,7 +2257,7 @@ dependencies = [ "postgres-types", "tokio", "tracing", - "xitca-io", + "xitca-io 0.5.1", "xitca-unsafe-collection", ] @@ -2137,7 +2271,7 @@ dependencies = [ "futures-core", "scoped-futures", "tokio", - "xitca-postgres", + "xitca-postgres 0.3.0", ] [[package]] @@ -2154,7 +2288,7 @@ dependencies = [ "toasty-sql", "tokio", "uuid", - "xitca-postgres", + "xitca-postgres 0.3.0", ] [[package]] @@ -2169,13 +2303,28 @@ dependencies = [ [[package]] name = "xitca-server" version = "0.5.0" -source = "git+http://github.com/HFQR/xitca-web?rev=b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b#b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fef263c0c189eadb879f5d990139450f23b781349fd3f1ca9ef85de218e4f1c6" +dependencies = [ + "socket2 0.5.10", + "tokio", + "tracing", + "xitca-io 0.4.1", + "xitca-service", + "xitca-unsafe-collection", +] + +[[package]] +name = "xitca-server" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94cbf5013af573c362caebeba0e2b6c62ebecc121ab24e3fd0523543e490ce8" dependencies = [ - "socket2", + "socket2 0.6.1", "tokio", - "tokio-uring", + "tokio-uring-xitca", "tracing", - "xitca-io", + "xitca-io 0.5.1", "xitca-service", "xitca-unsafe-collection", ] @@ -2183,7 +2332,8 @@ dependencies = [ [[package]] name = "xitca-service" version = "0.3.0" -source = "git+http://github.com/HFQR/xitca-web?rev=b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b#b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f9f7ff163aa7a466a40c6ee92571cbfba705f295bff4412854189454c54ed7" [[package]] name = "xitca-unsafe-collection" @@ -2211,17 +2361,16 @@ dependencies = [ "sailfish", "serde_core", "serde_json", - "socket2", + "socket2 0.6.1", "sonic-rs", "toasty", "tokio", - "tokio-uring", - "xitca-http", - "xitca-io", - "xitca-postgres", + "xitca-http 0.8.0", + "xitca-io 0.5.1", + "xitca-postgres 0.4.0", "xitca-postgres-diesel", "xitca-postgres-toasty", - "xitca-server", + "xitca-server 0.6.1", "xitca-service", "xitca-unsafe-collection", "xitca-web 0.7.1", @@ -2230,7 +2379,7 @@ dependencies = [ [[package]] name = "xitca-web" version = "0.7.1" -source = "git+http://github.com/HFQR/xitca-web?rev=b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b#b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" +source = "git+http://github.com/HFQR/xitca-web?rev=00cdcc9#00cdcc9936eade36ca17b00b611ef2266a0ff106" dependencies = [ "futures-core", "pin-project-lite", @@ -2239,8 +2388,8 @@ dependencies = [ "serde_urlencoded", "tokio", "xitca-codegen", - "xitca-http", - "xitca-server", + "xitca-http 0.7.1", + "xitca-server 0.5.0", "xitca-service", "xitca-unsafe-collection", ] @@ -2344,6 +2493,6 @@ dependencies = [ [[package]] name = "zmij" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e404bcd8afdaf006e529269d3e85a743f9480c3cef60034d77860d02964f3ba" +checksum = "d0095ecd462946aa3927d9297b63ef82fb9a5316d7a37d134eeb36e58228615a" diff --git a/frameworks/Rust/xitca-web/Cargo.toml b/frameworks/Rust/xitca-web/Cargo.toml index 5b47497fce7..df5fc62031a 100755 --- a/frameworks/Rust/xitca-web/Cargo.toml +++ b/frameworks/Rust/xitca-web/Cargo.toml @@ -42,7 +42,7 @@ web-codegen = ["xitca-web/codegen", "xitca-web/urlencoded"] # template optional template = ["dep:sailfish"] # io-uring optional -io-uring = ["dep:tokio-uring", "xitca-http/io-uring", "xitca-server/io-uring"] +io-uring = ["xitca-http/io-uring", "xitca-server/io-uring"] # zero-copy database row parsing optional(not supported by ORMs) zero-copy = [] # unrealistic performance optimization @@ -56,9 +56,9 @@ perf-json = ["sonic-rs"] compio = ["dep:compio", "dep:socket2", "xitca-http/compio", "xitca-postgres/compio"] [dependencies] -xitca-http = "0.7" -xitca-io = "0.4.1" -xitca-server = "0.5" +xitca-http = "0.8" +xitca-io = "0.5.1" +xitca-server = "0.6.1" xitca-service = "0.3" xitca-unsafe-collection = "0.2" @@ -70,7 +70,7 @@ serde_core = { version = "1" } xitca-web = { version = "0.7", features = ["json"], optional = true } # raw-pg optional -xitca-postgres = { version = "0.3", optional = true } +xitca-postgres = { version = "0.4", optional = true } # diesel orm optional diesel = { version = "2", features = ["postgres"], optional = true } @@ -85,9 +85,6 @@ toasty = { version = "0.1", optional = true } # template optional sailfish = { version = "0.10", default-features = false, features = ["perf-inline"], optional = true } -# io-uring optional -tokio-uring = { version = "0.5", optional = true } - # perf optional core_affinity = { version = "0.8.1", optional = true } mimalloc = { version = "0.1", default-features = false, optional = true } @@ -118,12 +115,6 @@ toasty = { git = "https://github.com/fakeshadow/toasty", rev = "51c8186" } toasty-core = { git = "https://github.com/fakeshadow/toasty", rev = "51c8186" } toasty-sql = { git = "https://github.com/fakeshadow/toasty", rev = "51c8186" } -# personal fork of tokio-uring with tokio local runtime enabled -tokio-uring = { git = "http://github.com/fakeshadow/tokio-uring", rev = "c3d5887" } - -xitca-codegen = { git = "http://github.com/HFQR/xitca-web", rev = "b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" } -xitca-http = { git = "http://github.com/HFQR/xitca-web", rev = "b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" } -xitca-postgres = { git = "http://github.com/HFQR/xitca-web", rev = "b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" } -xitca-server = { git = "http://github.com/HFQR/xitca-web", rev = "b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" } -xitca-service = { git = "http://github.com/HFQR/xitca-web", rev = "b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" } -xitca-web = { git = "http://github.com/HFQR/xitca-web", rev = "b3d7dc0be3783fe1ad66ba94236c3a1dcfc1af8b" } +xitca-codegen = { git = "http://github.com/HFQR/xitca-web", rev = "00cdcc9" } +xitca-postgres = { git = "http://github.com/HFQR/xitca-web", rev = "04a84e4" } +xitca-web = { git = "http://github.com/HFQR/xitca-web", rev = "00cdcc9" } diff --git a/frameworks/Rust/xitca-web/src/db_compio.rs b/frameworks/Rust/xitca-web/src/db_compio.rs deleted file mode 100644 index 94af18f2a3d..00000000000 --- a/frameworks/Rust/xitca-web/src/db_compio.rs +++ /dev/null @@ -1,79 +0,0 @@ -//! this module is unrealistic. related issue: -//! https://github.com/TechEmpower/FrameworkBenchmarks/issues/8790 - -use core::{ - async_iter::AsyncIterator, - future::{Future, poll_fn}, - pin::pin, -}; - -use xitca_postgres::{Execute, statement::Statement}; - -use super::{ - db::Exec, - ser::{Fortunes, World}, - util::{DB_URL, HandleResult}, -}; - -pub struct Client { - cli: xitca_postgres::Client, - exec: Exec, - fortune: Statement, - world: Statement, - update: Statement, -} - -impl Client { - pub async fn create() -> HandleResult { - let (cli, drv) = compio::runtime::spawn_blocking(|| { - tokio::runtime::Builder::new_current_thread() - .enable_all() - .build() - .unwrap() - .block_on(xitca_postgres::Postgres::new(DB_URL).connect()) - }) - .await - .unwrap()?; - - let drv = drv.try_into_tcp().expect("raw tcp is used for database connection"); - let drv = xitca_postgres::CompIoDriver::from_tcp(drv)?; - - compio::runtime::spawn(async move { - let mut drv = pin!(drv.into_async_iter()); - while poll_fn(|cx| drv.as_mut().poll_next(cx)).await.is_some() {} - }) - .detach(); - - let world = Exec::WORLD_STMT.execute(&cli).await?.leak(); - let fortune = Exec::FORTUNE_STMT.execute(&cli).await?.leak(); - let update = Exec::UPDATE_STMT.execute(&cli).await?.leak(); - - Ok(Self { - cli, - exec: Default::default(), - world, - fortune, - update, - }) - } - - #[inline] - pub fn db(&self) -> impl Future> { - self.exec.db(&self.cli, &self.world) - } - - #[inline] - pub fn queries(&self, num: u16) -> impl Future>> { - self.exec.queries(&self.cli, &self.world, num) - } - - #[inline] - pub fn updates(&self, num: u16) -> impl Future>> { - self.exec.updates(&self.cli, &self.world, &self.update, num) - } - - #[inline] - pub fn fortunes(&self) -> impl Future> { - Exec::fortunes(&self.cli, &self.fortune) - } -} diff --git a/frameworks/Rust/xitca-web/src/db_pool.rs b/frameworks/Rust/xitca-web/src/db_pool.rs index 28cc55de8de..21e06527a2e 100755 --- a/frameworks/Rust/xitca-web/src/db_pool.rs +++ b/frameworks/Rust/xitca-web/src/db_pool.rs @@ -13,8 +13,17 @@ pub struct Client { impl Client { pub async fn create() -> HandleResult { + let mut pool = Pool::builder(DB_URL); + + #[cfg(feature = "compio")] + { + pool = pool.connector(crate::CompIoConnector); + } + + pool = pool.capacity(1); + Ok(Self { - pool: Pool::builder(DB_URL).capacity(1).build()?, + pool: pool.build()?, exec: Default::default(), }) } diff --git a/frameworks/Rust/xitca-web/src/main_compio.rs b/frameworks/Rust/xitca-web/src/main_compio.rs index 546eb6dbdc8..074c687172c 100644 --- a/frameworks/Rust/xitca-web/src/main_compio.rs +++ b/frameworks/Rust/xitca-web/src/main_compio.rs @@ -7,7 +7,7 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; mod db; -mod db_compio; +mod db_pool; mod ser; mod util; @@ -43,7 +43,7 @@ type Request = http::Request>; type Response = http::Response>; -type Ctx<'a> = Context<'a, Request, db_compio::Client>; +type Ctx<'a> = Context<'a, Request, db_pool::Client>; fn main() -> io::Result<()> { let cores = std::thread::available_parallelism().map(|num| num.get()).unwrap_or(56); @@ -112,7 +112,7 @@ fn main() -> io::Result<()> { cli.updates(num).await.and_then(|w| json_response(req, &w)) })), ) - .enclosed(ContextBuilder::new(db_compio::Client::create)) + .enclosed(ContextBuilder::new(db_pool::Client::create)) .enclosed_fn(async |service, req| { let mut res = service.call(req).await.unwrap_or_else(error_handler); res.headers_mut().insert(SERVER, HeaderValue::from_static("x")); @@ -128,7 +128,7 @@ fn main() -> io::Result<()> { Ok((stream, addr)) => { let service = service.clone(); compio::runtime::spawn(async move { - let _ = Dispatcher::<_, _, _, 16, { usize::MAX }, { usize::MAX }>::run( + let _ = Dispatcher::<_, _, _, 64, { usize::MAX }, { usize::MAX }>::run( stream, addr, &service.0, &service.1, ) .await; @@ -186,13 +186,13 @@ struct Time(Rc>); impl Time { fn new() -> Self { - let state = Rc::new(RefCell::new(DateTimeState::new())); + let state = Rc::new(RefCell::new(DateTimeState::default())); let state2 = state.clone(); compio::runtime::spawn(async move { let mut interval = compio::runtime::time::interval(Duration::from_secs(1)); loop { let _ = interval.tick().await; - *state2.borrow_mut() = DateTimeState::new(); + *state2.borrow_mut() = DateTimeState::default(); } }) .detach(); @@ -201,8 +201,6 @@ impl Time { } impl DateTime for Time { - const DATE_VALUE_LENGTH: usize = 29; - fn with_date(&self, f: F) -> O where F: FnOnce(&[u8]) -> O, @@ -215,3 +213,31 @@ impl DateTime for Time { self.0.borrow().now } } + +struct CompIoConnector; + +impl xitca_postgres::pool::Connect for CompIoConnector { + async fn connect(&self, cfg: xitca_postgres::Config) -> Result { + let (cli, drv) = compio::runtime::spawn_blocking(|| { + tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .unwrap() + .block_on(xitca_postgres::Postgres::new(cfg).connect()) + }) + .await + .unwrap()?; + + let drv = drv.try_into_tcp().expect("raw tcp is used for database connection"); + let drv = xitca_postgres::CompIoDriver::from_tcp(drv)?; + + compio::runtime::spawn(async move { + use core::{async_iter::AsyncIterator, future::poll_fn, pin::pin}; + + let mut drv = pin!(drv.into_async_iter()); + while poll_fn(|cx| drv.as_mut().poll_next(cx)).await.is_some() {} + }) + .detach(); + Ok(cli) + } +} From 496018b5acf89ecedbbb66ebfc2382219a6b43fb Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Sat, 27 Dec 2025 22:31:59 +0800 Subject: [PATCH 2/3] lock file dedup --- frameworks/Rust/xitca-web/Cargo.lock | 197 +++++---------------- frameworks/Rust/xitca-web/Cargo.toml | 7 +- frameworks/Rust/xitca-web/src/db_diesel.rs | 25 ++- 3 files changed, 63 insertions(+), 166 deletions(-) diff --git a/frameworks/Rust/xitca-web/Cargo.lock b/frameworks/Rust/xitca-web/Cargo.lock index 26fe0f479ef..4791660cc15 100755 --- a/frameworks/Rust/xitca-web/Cargo.lock +++ b/frameworks/Rust/xitca-web/Cargo.lock @@ -218,7 +218,7 @@ dependencies = [ "paste", "polling", "slab", - "socket2 0.6.1", + "socket2", "windows-sys 0.61.2", ] @@ -274,7 +274,7 @@ dependencies = [ "either", "libc", "once_cell", - "socket2 0.6.1", + "socket2", "widestring", "windows-sys 0.61.2", ] @@ -298,7 +298,7 @@ dependencies = [ "pin-project-lite", "scoped-tls", "slab", - "socket2 0.6.1", + "socket2", "windows-sys 0.61.2", ] @@ -852,9 +852,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "itoap" @@ -1368,9 +1368,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" [[package]] name = "sailfish" @@ -1436,9 +1436,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.147" +version = "1.0.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af14725505314343e673e9ecb7cd7e8a36aa9791eb936235a3567cc31447ae4" +checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da" dependencies = [ "itoa", "memchr", @@ -1504,16 +1504,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.1" @@ -1756,7 +1746,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.1", + "socket2", "tokio-macros", "windows-sys 0.61.2", ] @@ -1793,7 +1783,7 @@ dependencies = [ "io-uring", "libc", "slab", - "socket2 0.6.1", + "socket2", "tokio", ] @@ -1982,22 +1972,13 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.5", + "windows-targets", ] [[package]] @@ -2009,22 +1990,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - [[package]] name = "windows-targets" version = "0.53.5" @@ -2032,106 +1997,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - [[package]] name = "windows_aarch64_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - [[package]] name = "windows_aarch64_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - [[package]] name = "windows_i686_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - [[package]] name = "windows_i686_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - [[package]] name = "windows_i686_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - [[package]] name = "windows_x86_64_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - [[package]] name = "windows_x86_64_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - [[package]] name = "windows_x86_64_msvc" version = "0.53.1" @@ -2153,7 +2070,8 @@ checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "xitca-codegen" version = "0.4.0" -source = "git+http://github.com/HFQR/xitca-web?rev=00cdcc9#00cdcc9936eade36ca17b00b611ef2266a0ff106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc921afd144bf419038845eba96c19949953d7c041018b12fb984c1a0c85bcce" dependencies = [ "quote", "syn", @@ -2161,30 +2079,9 @@ dependencies = [ [[package]] name = "xitca-http" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ebee6097494458ff127c1aaeb0c4fa4445406e7758b13e5423d561f252179fd" -dependencies = [ - "futures-core", - "http", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.10", - "tokio", - "tracing", - "xitca-io 0.4.1", - "xitca-router", - "xitca-service", - "xitca-unsafe-collection", -] - -[[package]] -name = "xitca-http" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c2f7c6cf5f620802442b8c53c3d5f2097898a96443ec0da3af2df4cab16d3d" +checksum = "98056bc20dbf6441ceb40d587a350140993444ec30ec50f7627b9044e320427e" dependencies = [ "compio-buf", "compio-io", @@ -2195,7 +2092,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.6.1", + "socket2", "tokio", "tracing", "xitca-io 0.5.1", @@ -2247,7 +2144,7 @@ dependencies = [ [[package]] name = "xitca-postgres" version = "0.4.0" -source = "git+http://github.com/HFQR/xitca-web?rev=04a84e4#04a84e4eb477550446d1e10b365b7561e409cd84" +source = "git+http://github.com/HFQR/xitca-web?rev=e0c1978#e0c1978889750a3c6b728a070b2691e393221ad4" dependencies = [ "compio", "fallible-iterator", @@ -2293,24 +2190,10 @@ dependencies = [ [[package]] name = "xitca-router" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a771113f381c9a2f5ae1096b70d629ed241a1a473304ea902258c3d528f536" -dependencies = [ - "xitca-unsafe-collection", -] - -[[package]] -name = "xitca-server" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef263c0c189eadb879f5d990139450f23b781349fd3f1ca9ef85de218e4f1c6" +checksum = "042ca11062ddf876f584c8a54d821328eac9f3a7727c1ec35bbb3f72838a4c5d" dependencies = [ - "socket2 0.5.10", - "tokio", - "tracing", - "xitca-io 0.4.1", - "xitca-service", "xitca-unsafe-collection", ] @@ -2320,7 +2203,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b94cbf5013af573c362caebeba0e2b6c62ebecc121ab24e3fd0523543e490ce8" dependencies = [ - "socket2 0.6.1", + "socket2", "tokio", "tokio-uring-xitca", "tracing", @@ -2361,35 +2244,35 @@ dependencies = [ "sailfish", "serde_core", "serde_json", - "socket2 0.6.1", + "socket2", "sonic-rs", "toasty", "tokio", - "xitca-http 0.8.0", + "xitca-http", "xitca-io 0.5.1", "xitca-postgres 0.4.0", "xitca-postgres-diesel", "xitca-postgres-toasty", - "xitca-server 0.6.1", + "xitca-server", "xitca-service", "xitca-unsafe-collection", - "xitca-web 0.7.1", + "xitca-web 0.8.0", ] [[package]] name = "xitca-web" -version = "0.7.1" -source = "git+http://github.com/HFQR/xitca-web?rev=00cdcc9#00cdcc9936eade36ca17b00b611ef2266a0ff106" +version = "0.8.0" +source = "git+http://github.com/HFQR/xitca-web?rev=e0c1978#e0c1978889750a3c6b728a070b2691e393221ad4" dependencies = [ "futures-core", "pin-project-lite", - "serde", + "serde_core", "serde_json", "serde_urlencoded", "tokio", "xitca-codegen", - "xitca-http 0.7.1", - "xitca-server 0.5.0", + "xitca-http", + "xitca-server", "xitca-service", "xitca-unsafe-collection", ] @@ -2493,6 +2376,6 @@ dependencies = [ [[package]] name = "zmij" -version = "0.1.9" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0095ecd462946aa3927d9297b63ef82fb9a5316d7a37d134eeb36e58228615a" +checksum = "e6d6085d62852e35540689d1f97ad663e3971fc19cf5eceab364d62c646ea167" diff --git a/frameworks/Rust/xitca-web/Cargo.toml b/frameworks/Rust/xitca-web/Cargo.toml index df5fc62031a..d8d700e286b 100755 --- a/frameworks/Rust/xitca-web/Cargo.toml +++ b/frameworks/Rust/xitca-web/Cargo.toml @@ -67,7 +67,7 @@ httparse = "1" serde_core = { version = "1" } # web optional -xitca-web = { version = "0.7", features = ["json"], optional = true } +xitca-web = { version = "0.8", features = ["json"], optional = true } # raw-pg optional xitca-postgres = { version = "0.4", optional = true } @@ -115,6 +115,5 @@ toasty = { git = "https://github.com/fakeshadow/toasty", rev = "51c8186" } toasty-core = { git = "https://github.com/fakeshadow/toasty", rev = "51c8186" } toasty-sql = { git = "https://github.com/fakeshadow/toasty", rev = "51c8186" } -xitca-codegen = { git = "http://github.com/HFQR/xitca-web", rev = "00cdcc9" } -xitca-postgres = { git = "http://github.com/HFQR/xitca-web", rev = "04a84e4" } -xitca-web = { git = "http://github.com/HFQR/xitca-web", rev = "00cdcc9" } +xitca-postgres = { git = "http://github.com/HFQR/xitca-web", rev = "e0c1978" } +xitca-web = { git = "http://github.com/HFQR/xitca-web", rev = "e0c1978" } diff --git a/frameworks/Rust/xitca-web/src/db_diesel.rs b/frameworks/Rust/xitca-web/src/db_diesel.rs index 03ded53d39b..41bcd8c8884 100755 --- a/frameworks/Rust/xitca-web/src/db_diesel.rs +++ b/frameworks/Rust/xitca-web/src/db_diesel.rs @@ -90,14 +90,29 @@ mod schema { fn update_query_from_ids(mut rngs: Vec<(i32, i32)>) -> String { rngs.sort_by(|(a, _), (b, _)| a.cmp(b)); - const PREFIX: &str = "UPDATE world SET randomNumber=w.r FROM (VALUES "; - const SUFFIX: &str = ") AS w (i,r) WHERE world.id=w.i"; + const PREFIX: &str = "UPDATE world SET randomNumber = w.r FROM (SELECT unnest(ARRAY["; + const MID: &str = "]) as i, unnest(ARRAY["; + const SUFFIX: &str = "]) as r) w WHERE world.id = w.i"; + const SIZE_HINT: usize = PREFIX.len() + MID.len() + SUFFIX.len() + "10000,".len(); - let mut query = String::from(PREFIX); + let mut query = String::with_capacity(SIZE_HINT); + + query.push_str(PREFIX); use core::fmt::Write; - rngs.iter().for_each(|(w_id, num)| { - write!(query, "({}::int,{}::int),", w_id, num).unwrap(); + + rngs.iter().for_each(|(w_id, _)| { + write!(query, "{},", w_id).unwrap(); + }); + + if query.ends_with(',') { + query.pop(); + } + + query.push_str(MID); + + rngs.iter().for_each(|(_, rand)| { + write!(query, "{},", rand).unwrap(); }); if query.ends_with(',') { From 56c5bc5539a765a940fc0927c55404a9041769bb Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Sun, 28 Dec 2025 15:13:17 +0800 Subject: [PATCH 3/3] dep update --- frameworks/Rust/xitca-web/Cargo.lock | 12 ++++++------ frameworks/Rust/xitca-web/Cargo.toml | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/frameworks/Rust/xitca-web/Cargo.lock b/frameworks/Rust/xitca-web/Cargo.lock index 4791660cc15..1b179473b3d 100755 --- a/frameworks/Rust/xitca-web/Cargo.lock +++ b/frameworks/Rust/xitca-web/Cargo.lock @@ -1144,9 +1144,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0" dependencies = [ "unicode-ident", ] @@ -2079,9 +2079,9 @@ dependencies = [ [[package]] name = "xitca-http" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98056bc20dbf6441ceb40d587a350140993444ec30ec50f7627b9044e320427e" +checksum = "ba51754e98a98549a1bae7a2f4c20e6b71d931cee6f43acd0307c2c70ba83f2a" dependencies = [ "compio-buf", "compio-io", @@ -2144,7 +2144,7 @@ dependencies = [ [[package]] name = "xitca-postgres" version = "0.4.0" -source = "git+http://github.com/HFQR/xitca-web?rev=e0c1978#e0c1978889750a3c6b728a070b2691e393221ad4" +source = "git+http://github.com/HFQR/xitca-web?rev=ae0db84#ae0db845390d23b62b9748111fab9347d9fe9090" dependencies = [ "compio", "fallible-iterator", @@ -2262,7 +2262,7 @@ dependencies = [ [[package]] name = "xitca-web" version = "0.8.0" -source = "git+http://github.com/HFQR/xitca-web?rev=e0c1978#e0c1978889750a3c6b728a070b2691e393221ad4" +source = "git+http://github.com/HFQR/xitca-web?rev=ae0db84#ae0db845390d23b62b9748111fab9347d9fe9090" dependencies = [ "futures-core", "pin-project-lite", diff --git a/frameworks/Rust/xitca-web/Cargo.toml b/frameworks/Rust/xitca-web/Cargo.toml index d8d700e286b..4803947cf85 100755 --- a/frameworks/Rust/xitca-web/Cargo.toml +++ b/frameworks/Rust/xitca-web/Cargo.toml @@ -56,7 +56,7 @@ perf-json = ["sonic-rs"] compio = ["dep:compio", "dep:socket2", "xitca-http/compio", "xitca-postgres/compio"] [dependencies] -xitca-http = "0.8" +xitca-http = "0.8.2" xitca-io = "0.5.1" xitca-server = "0.6.1" xitca-service = "0.3" @@ -115,5 +115,5 @@ toasty = { git = "https://github.com/fakeshadow/toasty", rev = "51c8186" } toasty-core = { git = "https://github.com/fakeshadow/toasty", rev = "51c8186" } toasty-sql = { git = "https://github.com/fakeshadow/toasty", rev = "51c8186" } -xitca-postgres = { git = "http://github.com/HFQR/xitca-web", rev = "e0c1978" } -xitca-web = { git = "http://github.com/HFQR/xitca-web", rev = "e0c1978" } +xitca-postgres = { git = "http://github.com/HFQR/xitca-web", rev = "ae0db84" } +xitca-web = { git = "http://github.com/HFQR/xitca-web", rev = "ae0db84" }