Reapply "Tokio"

This reverts commit 7891d2848d.
This commit is contained in:
lukas0008 2024-08-07 20:45:22 +02:00
parent 7891d2848d
commit f1b7d649db
4 changed files with 19 additions and 3 deletions

13
Cargo.lock generated
View File

@ -1177,6 +1177,7 @@ dependencies = [
"sha1", "sha1",
"simple_logger", "simple_logger",
"thiserror", "thiserror",
"tokio",
"toml", "toml",
"uuid", "uuid",
] ]
@ -1788,9 +1789,21 @@ dependencies = [
"mio", "mio",
"pin-project-lite", "pin-project-lite",
"socket2", "socket2",
"tokio-macros",
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
[[package]]
name = "tokio-macros"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.72",
]
[[package]] [[package]]
name = "tokio-native-tls" name = "tokio-native-tls"
version = "0.3.1" version = "0.3.1"

View File

@ -8,3 +8,6 @@ edition = "2021"
[profile.release] [profile.release]
lto = true lto = true
[workspace.dependencies]
tokio = { version = "1.39.2", features = ["net", "macros", "rt-multi-thread", "fs", "io-util"] }

View File

@ -49,5 +49,4 @@ crossbeam-channel = "0.5.13"
uuid = { version = "1.10", features = ["serde"]} uuid = { version = "1.10", features = ["serde"]}
tokio.workspace = true

View File

@ -23,7 +23,8 @@ pub mod server;
pub mod util; pub mod util;
#[cfg(not(target_os = "wasi"))] #[cfg(not(target_os = "wasi"))]
fn main() -> io::Result<()> { #[tokio::main]
async fn main() -> io::Result<()> {
use std::{cell::RefCell, time::Instant}; use std::{cell::RefCell, time::Instant};
let time = Instant::now(); let time = Instant::now();