Check for target_arch = “wasm32”

instead of target_os = “wasi”
This commit is contained in:
Nicolas Luck
2023-11-02 19:07:55 +01:00
parent ee1bd9e006
commit 59264c0aa5

View File

@@ -9,13 +9,13 @@ fn main() -> std::process::ExitCode {
})
.unwrap();
#[cfg(target_os = "wasi")]
#[cfg(target_arch = "wasm32")]
let runtime = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.unwrap();
#[cfg(not(target_os = "wasi"))]
#[cfg(not(target_arch = "wasm32"))]
let runtime = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()