From ea63e0fbfeabb0e9e12c809394f7897a60d5171c Mon Sep 17 00:00:00 2001 From: Timon Date: Wed, 28 Jan 2026 14:00:10 +0000 Subject: [PATCH] Use tokio because hyper needs it --- Cargo.lock | 1 + Cargo.toml | 2 +- desktop/Cargo.toml | 1 + desktop/src/app.rs | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 21876d1c7d..fc6ef1afe1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2363,6 +2363,7 @@ dependencies = [ "ron", "serde", "thiserror 2.0.16", + "tokio", "tracing", "tracing-subscriber", "vello", diff --git a/Cargo.toml b/Cargo.toml index 91ead4e58b..e1fb5ae822 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -179,7 +179,7 @@ web-sys = { version = "=0.3.77", features = [ winit = { git = "https://github.com/rust-windowing/winit.git" } keyboard-types = "0.8" url = "2.5" -tokio = { version = "1.29", features = ["fs", "macros", "io-std", "rt"] } +tokio = { version = "1.29", features = ["fs", "macros", "io-std", "rt", "rt-multi-thread"] } # Linebender ecosystem (BEGIN) kurbo = { version = "0.12", features = ["serde"] } vello = { git = "https://github.com/linebender/vello" } diff --git a/desktop/Cargo.toml b/desktop/Cargo.toml index 5fcded825e..372c9ba742 100644 --- a/desktop/Cargo.toml +++ b/desktop/Cargo.toml @@ -31,6 +31,7 @@ winit = { workspace = true, features = [ ] } thiserror = { workspace = true } futures = { workspace = true } +tokio = { workspace = true } cef = { workspace = true } cef-dll-sys = { workspace = true } tracing-subscriber = { workspace = true } diff --git a/desktop/src/app.rs b/desktop/src/app.rs index dfcf153f3e..c21df6f895 100644 --- a/desktop/src/app.rs +++ b/desktop/src/app.rs @@ -70,8 +70,9 @@ impl App { let rendering_app_event_scheduler = app_event_scheduler.clone(); let (start_render_sender, start_render_receiver) = std::sync::mpsc::sync_channel(1); std::thread::spawn(move || { + let runtime = tokio::runtime::Runtime::new().unwrap(); loop { - let result = futures::executor::block_on(DesktopWrapper::execute_node_graph()); + let result = runtime.block_on(DesktopWrapper::execute_node_graph()); rendering_app_event_scheduler.schedule(AppEvent::NodeGraphExecutionResult(result)); let _ = start_render_receiver.recv(); }