Browse Source

[xitca-web] add io_uring flavor to pg client. (#8292)

fakeshadow 2 years ago
parent
commit
8e7730d3af

+ 289 - 282
frameworks/Rust/xitca-web/Cargo.lock

@@ -2,15 +2,30 @@
 # It is not intended for manual editing.
 version = 3
 
+[[package]]
+name = "addr2line"
+version = "0.20.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3"
+dependencies = [
+    "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
 [[package]]
 name = "async-trait"
-version = "0.1.68"
+version = "0.1.69"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842"
+checksum = "7b2d0f03b3640e3a630367e40c468cb7f309529c708ed1d88597047b0e7c6ef7"
 dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.18",
+    "proc-macro2",
+    "quote",
+    "syn 2.0.23",
 ]
 
 [[package]]
@@ -19,7 +34,7 @@ version = "2.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528"
 dependencies = [
- "num-traits",
+    "num-traits",
 ]
 
 [[package]]
@@ -28,6 +43,21 @@ version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
 
+[[package]]
+name = "backtrace"
+version = "0.3.68"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12"
+dependencies = [
+    "addr2line",
+    "cc",
+    "cfg-if",
+    "libc",
+    "miniz_oxide",
+    "object",
+    "rustc-demangle",
+]
+
 [[package]]
 name = "base64"
 version = "0.21.2"
@@ -75,11 +105,11 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
 [[package]]
 name = "cpufeatures"
-version = "0.2.7"
+version = "0.2.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58"
+checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c"
 dependencies = [
- "libc",
+    "libc",
 ]
 
 [[package]]
@@ -136,11 +166,17 @@ version = "0.10.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
 dependencies = [
- "block-buffer",
- "crypto-common",
- "subtle",
+    "block-buffer",
+    "crypto-common",
+    "subtle",
 ]
 
+[[package]]
+name = "equivalent"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1"
+
 [[package]]
 name = "fallible-iterator"
 version = "0.2.0"
@@ -153,10 +189,10 @@ version = "0.2.21"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153"
 dependencies = [
- "cfg-if",
- "libc",
- "redox_syscall",
- "windows-sys 0.48.0",
+    "cfg-if",
+    "libc",
+    "redox_syscall 0.2.16",
+    "windows-sys",
 ]
 
 [[package]]
@@ -219,9 +255,9 @@ version = "0.3.28"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
 dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.18",
+    "proc-macro2",
+    "quote",
+    "syn 2.0.23",
 ]
 
 [[package]]
@@ -266,29 +302,32 @@ dependencies = [
 
 [[package]]
 name = "getrandom"
-version = "0.2.9"
+version = "0.2.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4"
+checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
 dependencies = [
- "cfg-if",
- "libc",
- "wasi",
+    "cfg-if",
+    "libc",
+    "wasi",
 ]
 
+[[package]]
+name = "gimli"
+version = "0.27.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
+
 [[package]]
 name = "hashbrown"
-version = "0.12.3"
+version = "0.14.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
 
 [[package]]
 name = "hermit-abi"
-version = "0.2.6"
+version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
-dependencies = [
- "libc",
-]
+checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
 
 [[package]]
 name = "hmac"
@@ -305,7 +344,7 @@ version = "0.5.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
 dependencies = [
- "windows-sys 0.48.0",
+    "windows-sys",
 ]
 
 [[package]]
@@ -333,12 +372,12 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
 
 [[package]]
 name = "indexmap"
-version = "1.9.3"
+version = "2.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
 dependencies = [
- "autocfg",
- "hashbrown",
+    "equivalent",
+    "hashbrown",
 ]
 
 [[package]]
@@ -353,9 +392,9 @@ dependencies = [
 
 [[package]]
 name = "itoa"
-version = "1.0.6"
+version = "1.0.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+checksum = "c0aa48fab2893d8a49caa94082ae8488f4e1050d73b367881dcd2198f4199fd8"
 
 [[package]]
 name = "itoap"
@@ -365,9 +404,9 @@ checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8"
 
 [[package]]
 name = "libc"
-version = "0.2.144"
+version = "0.2.147"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
 
 [[package]]
 name = "libmimalloc-sys"
@@ -381,19 +420,19 @@ dependencies = [
 
 [[package]]
 name = "lock_api"
-version = "0.4.9"
+version = "0.4.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
+checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
 dependencies = [
- "autocfg",
- "scopeguard",
+    "autocfg",
+    "scopeguard",
 ]
 
 [[package]]
 name = "log"
-version = "0.4.18"
+version = "0.4.19"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de"
+checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
 
 [[package]]
 name = "md-5"
@@ -416,7 +455,16 @@ version = "0.1.37"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4e2894987a3459f3ffb755608bd82188f8ed00d0ae077f1edea29c068d639d98"
 dependencies = [
- "libmimalloc-sys",
+    "libmimalloc-sys",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
+dependencies = [
+    "adler",
 ]
 
 [[package]]
@@ -424,9 +472,9 @@ name = "mio"
 version = "0.8.8"
 source = "git+https://github.com/fakeshadow/mio.git?rev=e506b0d87aa89e06c450a3991c491de35968cb12#e506b0d87aa89e06c450a3991c491de35968cb12"
 dependencies = [
- "libc",
- "wasi",
- "windows-sys 0.48.0",
+    "libc",
+    "wasi",
+    "windows-sys",
 ]
 
 [[package]]
@@ -446,19 +494,28 @@ dependencies = [
 
 [[package]]
 name = "num_cpus"
-version = "1.15.0"
+version = "1.16.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
 dependencies = [
- "hermit-abi",
- "libc",
+    "hermit-abi",
+    "libc",
+]
+
+[[package]]
+name = "object"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1"
+dependencies = [
+    "memchr",
 ]
 
 [[package]]
 name = "once_cell"
-version = "1.17.2"
+version = "1.18.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
 
 [[package]]
 name = "parking_lot"
@@ -472,46 +529,46 @@ dependencies = [
 
 [[package]]
 name = "parking_lot_core"
-version = "0.9.7"
+version = "0.9.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
+checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
 dependencies = [
- "cfg-if",
- "libc",
- "redox_syscall",
- "smallvec",
- "windows-sys 0.45.0",
+    "cfg-if",
+    "libc",
+    "redox_syscall 0.3.5",
+    "smallvec",
+    "windows-targets",
 ]
 
 [[package]]
 name = "percent-encoding"
-version = "2.2.0"
+version = "2.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
+checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
 
 [[package]]
 name = "phf"
-version = "0.11.1"
+version = "0.11.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c"
+checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
 dependencies = [
- "phf_shared",
+    "phf_shared",
 ]
 
 [[package]]
 name = "phf_shared"
-version = "0.11.1"
+version = "0.11.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676"
+checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b"
 dependencies = [
- "siphasher",
+    "siphasher",
 ]
 
 [[package]]
 name = "pin-project-lite"
-version = "0.2.9"
+version = "0.2.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57"
 
 [[package]]
 name = "pin-utils"
@@ -580,20 +637,20 @@ dependencies = [
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.59"
+version = "1.0.63"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b"
+checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb"
 dependencies = [
- "unicode-ident",
+    "unicode-ident",
 ]
 
 [[package]]
 name = "quote"
-version = "1.0.28"
+version = "1.0.29"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
+checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105"
 dependencies = [
- "proc-macro2",
+    "proc-macro2",
 ]
 
 [[package]]
@@ -632,9 +689,24 @@ version = "0.2.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
 dependencies = [
- "bitflags",
+    "bitflags",
 ]
 
+[[package]]
+name = "redox_syscall"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
+dependencies = [
+    "bitflags",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
 [[package]]
 name = "ryu"
 version = "1.0.13"
@@ -659,14 +731,14 @@ version = "0.6.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f26deb100e96e303d266d1852525b1da033678ed9eabd539f5ed5eba01333394"
 dependencies = [
- "filetime",
- "home",
- "memchr",
- "proc-macro2",
- "quote",
- "serde",
- "syn 2.0.18",
- "toml",
+    "filetime",
+    "home",
+    "memchr",
+    "proc-macro2",
+    "quote",
+    "serde",
+    "syn 2.0.23",
+    "toml",
 ]
 
 [[package]]
@@ -703,53 +775,53 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
 
 [[package]]
 name = "serde"
-version = "1.0.163"
+version = "1.0.165"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2"
+checksum = "c939f902bb7d0ccc5bce4f03297e161543c2dcb30914faf032c2bd0b7a0d48fc"
 dependencies = [
- "serde_derive",
+    "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.163"
+version = "1.0.165"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e"
+checksum = "6eaae920e25fffe4019b75ff65e7660e72091e59dd204cb5849bbd6a3fd343d7"
 dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.18",
+    "proc-macro2",
+    "quote",
+    "syn 2.0.23",
 ]
 
 [[package]]
 name = "serde_json"
-version = "1.0.96"
+version = "1.0.99"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
+checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3"
 dependencies = [
- "itoa",
- "ryu",
- "serde",
+    "itoa",
+    "ryu",
+    "serde",
 ]
 
 [[package]]
 name = "serde_spanned"
-version = "0.6.2"
+version = "0.6.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d"
+checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186"
 dependencies = [
- "serde",
+    "serde",
 ]
 
 [[package]]
 name = "sha2"
-version = "0.10.6"
+version = "0.10.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
+checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
 dependencies = [
- "cfg-if",
- "cpufeatures",
- "digest",
+    "cfg-if",
+    "cpufeatures",
+    "digest",
 ]
 
 [[package]]
@@ -798,8 +870,8 @@ version = "0.5.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877"
 dependencies = [
- "libc",
- "windows-sys 0.48.0",
+    "libc",
+    "windows-sys",
 ]
 
 [[package]]
@@ -831,13 +903,13 @@ dependencies = [
 
 [[package]]
 name = "syn"
-version = "2.0.18"
+version = "2.0.23"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e"
+checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737"
 dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
+    "proc-macro2",
+    "quote",
+    "unicode-ident",
 ]
 
 [[package]]
@@ -863,19 +935,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
 
 [[package]]
 name = "tokio"
-version = "1.28.2"
+version = "1.29.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2"
+checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da"
 dependencies = [
- "autocfg",
- "bytes",
- "libc",
- "mio",
- "num_cpus",
- "pin-project-lite",
- "signal-hook-registry",
- "socket2 0.4.9",
- "windows-sys 0.48.0",
+    "autocfg",
+    "backtrace",
+    "bytes",
+    "libc",
+    "mio",
+    "num_cpus",
+    "pin-project-lite",
+    "signal-hook-registry",
+    "socket2 0.4.9",
+    "windows-sys",
 ]
 
 [[package]]
@@ -933,36 +1006,36 @@ dependencies = [
 
 [[package]]
 name = "toml"
-version = "0.7.4"
+version = "0.7.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec"
+checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240"
 dependencies = [
- "serde",
- "serde_spanned",
- "toml_datetime",
- "toml_edit",
+    "serde",
+    "serde_spanned",
+    "toml_datetime",
+    "toml_edit",
 ]
 
 [[package]]
 name = "toml_datetime"
-version = "0.6.2"
+version = "0.6.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f"
+checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
 dependencies = [
- "serde",
+    "serde",
 ]
 
 [[package]]
 name = "toml_edit"
-version = "0.19.10"
+version = "0.19.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739"
+checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7"
 dependencies = [
- "indexmap",
- "serde",
- "serde_spanned",
- "toml_datetime",
- "winnow",
+    "indexmap",
+    "serde",
+    "serde_spanned",
+    "toml_datetime",
+    "winnow",
 ]
 
 [[package]]
@@ -1046,132 +1119,66 @@ version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
 
-[[package]]
-name = "windows-sys"
-version = "0.45.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
-dependencies = [
- "windows-targets 0.42.2",
-]
-
 [[package]]
 name = "windows-sys"
 version = "0.48.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
 dependencies = [
- "windows-targets 0.48.0",
+    "windows-targets",
 ]
 
 [[package]]
 name = "windows-targets"
-version = "0.42.2"
+version = "0.48.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
+checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
 dependencies = [
- "windows_aarch64_gnullvm 0.42.2",
- "windows_aarch64_msvc 0.42.2",
- "windows_i686_gnu 0.42.2",
- "windows_i686_msvc 0.42.2",
- "windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm 0.42.2",
- "windows_x86_64_msvc 0.42.2",
-]
-
-[[package]]
-name = "windows-targets"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
-dependencies = [
- "windows_aarch64_gnullvm 0.48.0",
- "windows_aarch64_msvc 0.48.0",
- "windows_i686_gnu 0.48.0",
- "windows_i686_msvc 0.48.0",
- "windows_x86_64_gnu 0.48.0",
- "windows_x86_64_gnullvm 0.48.0",
- "windows_x86_64_msvc 0.48.0",
+    "windows_aarch64_gnullvm",
+    "windows_aarch64_msvc",
+    "windows_i686_gnu",
+    "windows_i686_msvc",
+    "windows_x86_64_gnu",
+    "windows_x86_64_gnullvm",
+    "windows_x86_64_msvc",
 ]
 
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.42.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
-
 [[package]]
 name = "windows_aarch64_gnullvm"
 version = "0.48.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
 
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.42.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
-
 [[package]]
 name = "windows_aarch64_msvc"
 version = "0.48.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
 
-[[package]]
-name = "windows_i686_gnu"
-version = "0.42.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
-
 [[package]]
 name = "windows_i686_gnu"
 version = "0.48.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
 
-[[package]]
-name = "windows_i686_msvc"
-version = "0.42.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
-
 [[package]]
 name = "windows_i686_msvc"
 version = "0.48.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
 
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.42.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
-
 [[package]]
 name = "windows_x86_64_gnu"
 version = "0.48.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
 
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.42.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
-
 [[package]]
 name = "windows_x86_64_gnullvm"
 version = "0.48.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
 
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.42.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
-
 [[package]]
 name = "windows_x86_64_msvc"
 version = "0.48.0"
@@ -1180,27 +1187,27 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
 
 [[package]]
 name = "winnow"
-version = "0.4.6"
+version = "0.4.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699"
+checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448"
 dependencies = [
- "memchr",
+    "memchr",
 ]
 
 [[package]]
 name = "xitca-http"
 version = "0.1.0"
-source = "git+https://github.com/HFQR/xitca-web.git?rev=061a61adc33205a7d7a124cee5665522a3df4d59#061a61adc33205a7d7a124cee5665522a3df4d59"
-dependencies = [
- "futures-core",
- "http",
- "httparse",
- "httpdate",
- "itoa",
- "pin-project-lite",
- "socket2 0.5.3",
- "tokio",
- "tokio-uring",
+source = "git+https://github.com/HFQR/xitca-web.git?rev=3255e9ab0c585a18989bb6b8dd87b333ce662876#3255e9ab0c585a18989bb6b8dd87b333ce662876"
+dependencies = [
+    "futures-core",
+    "http",
+    "httparse",
+    "httpdate",
+    "itoa",
+    "pin-project-lite",
+    "socket2 0.5.3",
+    "tokio",
+    "tokio-uring",
  "tracing",
  "xitca-io",
  "xitca-router",
@@ -1211,63 +1218,63 @@ dependencies = [
 [[package]]
 name = "xitca-io"
 version = "0.1.0"
-source = "git+https://github.com/HFQR/xitca-web.git?rev=061a61adc33205a7d7a124cee5665522a3df4d59#061a61adc33205a7d7a124cee5665522a3df4d59"
+source = "git+https://github.com/HFQR/xitca-web.git?rev=3255e9ab0c585a18989bb6b8dd87b333ce662876#3255e9ab0c585a18989bb6b8dd87b333ce662876"
 dependencies = [
- "bytes",
- "tokio",
- "tokio-uring",
- "xitca-unsafe-collection",
+    "bytes",
+    "tokio",
+    "tokio-uring",
+    "xitca-unsafe-collection",
 ]
 
 [[package]]
 name = "xitca-postgres"
 version = "0.1.0"
-source = "git+https://github.com/HFQR/xitca-web.git?rev=061a61adc33205a7d7a124cee5665522a3df4d59#061a61adc33205a7d7a124cee5665522a3df4d59"
+source = "git+https://github.com/HFQR/xitca-web.git?rev=3255e9ab0c585a18989bb6b8dd87b333ce662876#3255e9ab0c585a18989bb6b8dd87b333ce662876"
 dependencies = [
- "fallible-iterator",
- "percent-encoding",
- "postgres-protocol",
- "postgres-types",
- "tokio",
- "tracing",
- "xitca-io",
- "xitca-service",
- "xitca-unsafe-collection",
+    "fallible-iterator",
+    "percent-encoding",
+    "postgres-protocol",
+    "postgres-types",
+    "tokio",
+    "tracing",
+    "xitca-io",
+    "xitca-service",
+    "xitca-unsafe-collection",
 ]
 
 [[package]]
 name = "xitca-router"
 version = "0.1.0"
-source = "git+https://github.com/HFQR/xitca-web.git?rev=061a61adc33205a7d7a124cee5665522a3df4d59#061a61adc33205a7d7a124cee5665522a3df4d59"
+source = "git+https://github.com/HFQR/xitca-web.git?rev=3255e9ab0c585a18989bb6b8dd87b333ce662876#3255e9ab0c585a18989bb6b8dd87b333ce662876"
 dependencies = [
- "xitca-unsafe-collection",
+    "xitca-unsafe-collection",
 ]
 
 [[package]]
 name = "xitca-server"
 version = "0.1.0"
-source = "git+https://github.com/HFQR/xitca-web.git?rev=061a61adc33205a7d7a124cee5665522a3df4d59#061a61adc33205a7d7a124cee5665522a3df4d59"
+source = "git+https://github.com/HFQR/xitca-web.git?rev=3255e9ab0c585a18989bb6b8dd87b333ce662876#3255e9ab0c585a18989bb6b8dd87b333ce662876"
 dependencies = [
- "socket2 0.5.3",
- "tokio",
- "tokio-uring",
- "tracing",
- "xitca-io",
- "xitca-service",
- "xitca-unsafe-collection",
+    "socket2 0.5.3",
+    "tokio",
+    "tokio-uring",
+    "tracing",
+    "xitca-io",
+    "xitca-service",
+    "xitca-unsafe-collection",
 ]
 
 [[package]]
 name = "xitca-service"
 version = "0.1.0"
-source = "git+https://github.com/HFQR/xitca-web.git?rev=061a61adc33205a7d7a124cee5665522a3df4d59#061a61adc33205a7d7a124cee5665522a3df4d59"
+source = "git+https://github.com/HFQR/xitca-web.git?rev=3255e9ab0c585a18989bb6b8dd87b333ce662876#3255e9ab0c585a18989bb6b8dd87b333ce662876"
 
 [[package]]
 name = "xitca-unsafe-collection"
 version = "0.1.0"
-source = "git+https://github.com/HFQR/xitca-web.git?rev=061a61adc33205a7d7a124cee5665522a3df4d59#061a61adc33205a7d7a124cee5665522a3df4d59"
+source = "git+https://github.com/HFQR/xitca-web.git?rev=3255e9ab0c585a18989bb6b8dd87b333ce662876#3255e9ab0c585a18989bb6b8dd87b333ce662876"
 dependencies = [
- "bytes",
+    "bytes",
 ]
 
 [[package]]
@@ -1281,30 +1288,30 @@ dependencies = [
  "mimalloc",
  "nanorand",
  "sailfish",
- "serde",
- "serde_json",
- "tang-rs",
- "tokio",
- "xitca-http",
- "xitca-io",
- "xitca-postgres",
- "xitca-server",
- "xitca-service",
- "xitca-unsafe-collection",
- "xitca-web 0.1.0 (git+https://github.com/HFQR/xitca-web.git?rev=061a61adc33205a7d7a124cee5665522a3df4d59)",
+    "serde",
+    "serde_json",
+    "tang-rs",
+    "tokio",
+    "xitca-http",
+    "xitca-io",
+    "xitca-postgres",
+    "xitca-server",
+    "xitca-service",
+    "xitca-unsafe-collection",
+    "xitca-web 0.1.0 (git+https://github.com/HFQR/xitca-web.git?rev=3255e9ab0c585a18989bb6b8dd87b333ce662876)",
 ]
 
 [[package]]
 name = "xitca-web"
 version = "0.1.0"
-source = "git+https://github.com/HFQR/xitca-web.git?rev=061a61adc33205a7d7a124cee5665522a3df4d59#061a61adc33205a7d7a124cee5665522a3df4d59"
-dependencies = [
- "futures-core",
- "pin-project-lite",
- "serde",
- "serde_json",
- "xitca-http",
- "xitca-server",
- "xitca-service",
- "xitca-unsafe-collection",
+source = "git+https://github.com/HFQR/xitca-web.git?rev=3255e9ab0c585a18989bb6b8dd87b333ce662876#3255e9ab0c585a18989bb6b8dd87b333ce662876"
+dependencies = [
+    "futures-core",
+    "pin-project-lite",
+    "serde",
+    "serde_json",
+    "xitca-http",
+    "xitca-server",
+    "xitca-service",
+    "xitca-unsafe-collection",
 ]

+ 11 - 9
frameworks/Rust/xitca-web/Cargo.toml

@@ -16,7 +16,7 @@ required-features = ["pg-orm", "serde", "template", "web"]
 [[bin]]
 name = "xitca-web-iou"
 path = "./src/main_iou.rs"
-required-features = ["io-uring", "pg", "serde", "template"]
+required-features = ["io-uring", "pg-iou", "serde", "template"]
 
 [[bin]]
 name = "xitca-web-wasm"
@@ -26,6 +26,8 @@ required-features = ["serde", "web"]
 [features]
 # pg optional
 pg = ["xitca-postgres"]
+# pg io_uring optional
+pg-iou = ["xitca-postgres/io-uring"]
 # pg orm optional
 pg-orm = ["diesel", "diesel-async", "tang-rs"]
 # serde optional
@@ -78,13 +80,13 @@ codegen-units = 1
 panic = "abort"
 
 [patch.crates-io]
-xitca-http = { git = "https://github.com/HFQR/xitca-web.git", rev = "061a61adc33205a7d7a124cee5665522a3df4d59" }
-xitca-io = { git = "https://github.com/HFQR/xitca-web.git", rev = "061a61adc33205a7d7a124cee5665522a3df4d59" }
-xitca-postgres = { git = "https://github.com/HFQR/xitca-web.git", rev = "061a61adc33205a7d7a124cee5665522a3df4d59" }
-xitca-router = { git = "https://github.com/HFQR/xitca-web.git", rev = "061a61adc33205a7d7a124cee5665522a3df4d59" }
-xitca-server = { git = "https://github.com/HFQR/xitca-web.git", rev = "061a61adc33205a7d7a124cee5665522a3df4d59" }
-xitca-service = { git = "https://github.com/HFQR/xitca-web.git", rev = "061a61adc33205a7d7a124cee5665522a3df4d59" }
-xitca-unsafe-collection = { git = "https://github.com/HFQR/xitca-web.git", rev = "061a61adc33205a7d7a124cee5665522a3df4d59" }
-xitca-web = { git = "https://github.com/HFQR/xitca-web.git", rev = "061a61adc33205a7d7a124cee5665522a3df4d59" }
+xitca-http = { git = "https://github.com/HFQR/xitca-web.git", rev = "3255e9ab0c585a18989bb6b8dd87b333ce662876" }
+xitca-io = { git = "https://github.com/HFQR/xitca-web.git", rev = "3255e9ab0c585a18989bb6b8dd87b333ce662876" }
+xitca-postgres = { git = "https://github.com/HFQR/xitca-web.git", rev = "3255e9ab0c585a18989bb6b8dd87b333ce662876" }
+xitca-router = { git = "https://github.com/HFQR/xitca-web.git", rev = "3255e9ab0c585a18989bb6b8dd87b333ce662876" }
+xitca-server = { git = "https://github.com/HFQR/xitca-web.git", rev = "3255e9ab0c585a18989bb6b8dd87b333ce662876" }
+xitca-service = { git = "https://github.com/HFQR/xitca-web.git", rev = "3255e9ab0c585a18989bb6b8dd87b333ce662876" }
+xitca-unsafe-collection = { git = "https://github.com/HFQR/xitca-web.git", rev = "3255e9ab0c585a18989bb6b8dd87b333ce662876" }
+xitca-web = { git = "https://github.com/HFQR/xitca-web.git", rev = "3255e9ab0c585a18989bb6b8dd87b333ce662876" }
 
 mio = { git = "https://github.com/fakeshadow/mio.git", rev = "e506b0d87aa89e06c450a3991c491de35968cb12" }

+ 16 - 13
frameworks/Rust/xitca-web/src/db.rs

@@ -1,9 +1,4 @@
-use std::{
-    cell::RefCell,
-    collections::HashMap,
-    fmt::Write,
-    future::{Future, IntoFuture},
-};
+use std::{cell::RefCell, collections::HashMap, fmt::Write, future::Future};
 
 use futures_util::future::{try_join, try_join_all, TryFutureExt};
 use xitca_postgres::{statement::Statement, AsyncIterator, Postgres};
@@ -35,7 +30,18 @@ impl Drop for Client {
 pub async fn create(config: &str) -> HandleResult<Client> {
     let (client, driver) = Postgres::new(config.to_string()).connect().await?;
 
-    tokio::task::spawn_local(driver.into_future());
+    tokio::task::spawn_local({
+        #[cfg(feature = "pg-iou")]
+        {
+            let mut drv = driver.try_into_io_uring_tcp();
+            async move { while drv.next().await.is_some() {} }
+        }
+
+        #[cfg(not(feature = "pg-iou"))]
+        {
+            std::future::IntoFuture::into_future(driver)
+        }
+    });
 
     let fortune = client.prepare("SELECT * FROM fortune", &[]).await?.leak();
 
@@ -83,7 +89,7 @@ impl Client {
             .next()
             .await
             .ok_or_else(|| format!("World {id} does not exist"))?
-            .map(|row| World::new(row.get(0), row.get(1)))
+            .map(|row| World::new(row.get_raw(0), row.get_raw(1)))
             .map_err(Into::into)
     }
 
@@ -130,16 +136,13 @@ impl Client {
     pub async fn tell_fortune(&self) -> HandleResult<Fortunes> {
         let mut items = Vec::with_capacity(32);
 
-        items.push(Fortune::from_static(
-            0,
-            "Additional fortune added at request time.",
-        ));
+        items.push(Fortune::new(0, "Additional fortune added at request time."));
 
         let mut stream = self.client.query_raw::<[i32; 0]>(&self.fortune, []).await?;
 
         while let Some(row) = stream.next().await {
             let row = row?;
-            items.push(Fortune::new(row.get(0), row.get(1)));
+            items.push(Fortune::new(row.get_raw(0), row.get_raw::<String>(1)));
         }
 
         items.sort_by(|it, next| it.message.cmp(&next.message));

+ 6 - 15
frameworks/Rust/xitca-web/src/main_iou.rs

@@ -11,16 +11,9 @@ mod db;
 mod ser;
 mod util;
 
-use std::{
-    cell::RefCell,
-    convert::Infallible,
-    fmt,
-    future::{poll_fn, Future},
-    io,
-    pin::pin,
-};
+use std::{cell::RefCell, convert::Infallible, fmt, future::Future, io};
 
-use futures_util::stream::Stream;
+use futures_util::stream::StreamExt;
 use xitca_http::{
     body::Once,
     date::DateTimeService,
@@ -39,6 +32,7 @@ use xitca_io::{
     net::{io_uring::TcpStream as IOUTcpStream, TcpStream},
 };
 use xitca_service::{fn_service, middleware::UncheckedReady, Service, ServiceExt};
+use xitca_unsafe_collection::futures::NowOrPanic;
 
 use self::{
     db::Client,
@@ -190,13 +184,10 @@ where
 
                 while let Some((req, _)) = ctx.decode_head::<{ usize::MAX }>(&mut read_buf).unwrap()
                 {
-                    let (parts, body) = self.service.call(req).await.unwrap().into_parts();
+                    let (parts, mut body) = self.service.call(req).await.unwrap().into_parts();
                     let mut encoder = ctx.encode_head(parts, &body, &mut write_buf).unwrap();
-                    let mut body = pin!(body);
-                    while let Some(chunk) = poll_fn(|cx| body.as_mut().poll_next(cx)).await {
-                        let chunk = chunk.unwrap();
-                        encoder.encode(chunk, &mut write_buf);
-                    }
+                    let chunk = body.next().now_or_panic().unwrap().unwrap();
+                    encoder.encode(chunk, &mut write_buf);
                     encoder.encode_eof(&mut write_buf);
                 }
 

+ 3 - 24
frameworks/Rust/xitca-web/src/ser.rs

@@ -1,7 +1,6 @@
 #![allow(dead_code)]
 
-#[cfg(feature = "pg")]
-use xitca_unsafe_collection::bytes::BytesStr;
+use std::borrow::Cow;
 
 pub struct Message {
     message: &'static str,
@@ -32,32 +31,12 @@ impl World {
 #[cfg_attr(feature = "pg-orm", derive(Queryable))]
 pub struct Fortune {
     pub id: i32,
-    #[cfg(feature = "pg")]
-    pub message: BytesStr,
-    #[cfg(not(feature = "pg"))]
-    pub message: String,
+    pub message: Cow<'static, str>,
 }
 
-#[cfg(feature = "pg")]
 impl Fortune {
     #[inline]
-    pub const fn from_static(id: i32, message: &'static str) -> Self {
-        Self {
-            id,
-            message: BytesStr::from_static(message),
-        }
-    }
-
-    #[inline]
-    pub const fn new(id: i32, message: BytesStr) -> Self {
-        Self { id, message }
-    }
-}
-
-#[cfg(not(feature = "pg"))]
-impl Fortune {
-    #[inline]
-    pub fn new(id: i32, message: impl Into<String>) -> Self {
+    pub fn new(id: i32, message: impl Into<Cow<'static, str>>) -> Self {
         Self {
             id,
             message: message.into(),

+ 1 - 1
frameworks/Rust/xitca-web/xitca-web-iou.dockerfile

@@ -3,7 +3,7 @@ FROM rust:latest
 ADD ./ /xitca-web
 WORKDIR /xitca-web
 
-RUN cargo build --release --bin xitca-web-iou --features io-uring,pg,serde,template
+RUN cargo build --release --bin xitca-web-iou --features io-uring,pg-iou,serde,template
 
 EXPOSE 8080