fix(settings): wrap WebView2 env override in unsafe block for Rust 1.82+

This commit is contained in:
xintaofei
2026-04-25 21:33:39 +08:00
parent ec07afed50
commit 7699b1a58c

View File

@@ -77,8 +77,12 @@ mod tauri_app {
tokens.push(arg.to_string());
}
}
// SAFETY: called before any tokio worker or plugin thread spawns, so
// no concurrent `getenv` can race. `set_var` is `unsafe` since Rust 1.82.
unsafe {
std::env::set_var(ENV_KEY, tokens.join(" "));
}
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {