refactor(rust): tell Tauri to use our existing runtime (#8514)

Tauri needs a tokio runtime in order to spawn tasks. If we don't supply
one, it will start its own runtime. Given that we already start a
runtime, this is unnecessary.
This commit is contained in:
Thomas Eizinger
2025-03-26 02:50:25 +11:00
committed by GitHub
parent 3e8eb12e16
commit a9864e5bd0

View File

@@ -131,6 +131,8 @@ pub(crate) fn run(
) -> Result<()> {
// Needed for the deep link server
let rt = tokio::runtime::Runtime::new().context("Couldn't start Tokio runtime")?;
tauri::async_runtime::set(rt.handle().clone());
let _guard = rt.enter();
// Make sure we're single-instance