From 3a393fc29fd0575288c8219c66c66a3eb74f9114 Mon Sep 17 00:00:00 2001 From: oopsbagel Date: Tue, 1 Jul 2025 22:07:47 -0700 Subject: [PATCH] installer: tokio runtime flavor current_thread Slightly reduce binary size by using the smaller 'rt' feature and the current_thread runtime flavor in the installer, since there is no benefit to true multithreading. --- installer/Cargo.toml | 2 +- installer/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/Cargo.toml b/installer/Cargo.toml index 3bfb9ae..a286494 100644 --- a/installer/Cargo.toml +++ b/installer/Cargo.toml @@ -19,7 +19,7 @@ nusb = "0.1.13" reqwest = { version = "0.12.15", features = ["json"], default-features = false } serde = { version = "1.0.219", features = ["derive"] } sha2 = "0.10.8" -tokio = { version = "1.44.2", features = ["io-util", "macros", "rt-multi-thread"], default-features = false } +tokio = { version = "1.44.2", features = ["io-util", "macros", "rt"], default-features = false } tokio-retry2 = "0.5.7" tokio-stream = "0.1.17" diff --git a/installer/src/main.rs b/installer/src/main.rs index de785b8..cc1cf7b 100644 --- a/installer/src/main.rs +++ b/installer/src/main.rs @@ -142,7 +142,7 @@ async fn run() -> Result<(), Error> { Ok(()) } -#[tokio::main] +#[tokio::main(flavor = "current_thread")] async fn main() { if let Err(e) = run().await { eprintln!("{e:?}");