hunter: try out tokio-uring
This commit is contained in:
parent
33c910ff7a
commit
2847bdc69e
|
@ -355,6 +355,7 @@ dependencies = [
|
|||
"serde",
|
||||
"texting_robots",
|
||||
"tokio",
|
||||
"tokio-uring",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
|
@ -1004,6 +1005,16 @@ dependencies = [
|
|||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "io-uring"
|
||||
version = "0.5.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd1e1a01cfb924fd8c5c43b6827965db394f5a3a16c599ce03452266e1cf984c"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ipconfig"
|
||||
version = "0.3.1"
|
||||
|
@ -1746,6 +1757,12 @@ dependencies = [
|
|||
"windows-sys 0.42.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scoped-tls"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.1.0"
|
||||
|
@ -2069,6 +2086,20 @@ dependencies = [
|
|||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-uring"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0d5e02bb137e030b3a547c65a3bd2f1836d66a97369fdcc69034002b10e155ef"
|
||||
dependencies = [
|
||||
"io-uring",
|
||||
"libc",
|
||||
"scoped-tls",
|
||||
"slab",
|
||||
"socket2",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-util"
|
||||
version = "0.7.7"
|
||||
|
|
|
@ -6,6 +6,7 @@ edition = "2021"
|
|||
[dependencies]
|
||||
futures = "0.3"
|
||||
tokio = { version = "1", features = ["full", "tracing"] }
|
||||
tokio-uring = "0.4"
|
||||
reqwest = { version = "0.11", features = ["json", "deflate", "gzip", "trust-dns"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
# serde_yaml = "0.9"
|
||||
|
|
|
@ -17,8 +17,14 @@ use worker::Message;
|
|||
#[global_allocator]
|
||||
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
tokio_uring::start(async {
|
||||
run().await;
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
async fn run() {
|
||||
cave::systemd::extend_timeout(100_000);
|
||||
|
||||
cave::init::exit_on_panic();
|
||||
|
|
Loading…
Reference in New Issue