From b4b6b292d0f043c518fd5fa5026a651bfe6c82ce Mon Sep 17 00:00:00 2001 From: Michael Pfaff Date: Tue, 8 Nov 2022 09:24:05 -0500 Subject: [PATCH] Use multi-threaded runtime and fix rustup installer --- Cargo.toml | 2 +- src/main.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9e2f12b..5ab803e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ ramhorns = "0.14" reqwest = { version = "0.11.10", features = ["json"] } serde = { version = "1", features = ["derive"] } serde_json = "1" -tokio = { version = "1.19", features = ["fs", "macros", "process", "rt"] } +tokio = { version = "1.19", features = ["fs", "macros", "process", "rt", "rt-multi-thread"] } url = "2.2" windows-sys = { version = "0.42", features = ["Win32_Foundation", "Win32_System_Registry", "Win32_System_WindowsProgramming"] } diff --git a/src/main.rs b/src/main.rs index d66b9c9..fe2821d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,7 +43,8 @@ pub struct Context { pub reqwest: reqwest::Client, } -#[tokio::main(flavor = "current_thread")] +//#[tokio::main(flavor = "current_thread")] +#[tokio::main] async fn main() -> Result<()> { println!("Bootstrapping..."); @@ -227,6 +228,7 @@ async fn main() -> Result<()> { Step::ExecuteCommand { file: rustup_init.into(), args: &[ + "-y", "--default-host", "x86_64-pc-windows-gnu", "--default-toolchain",