From c6e47fece3098aa39e0f42e27c5363bf50046c6c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 3 Nov 2026 10:09:51 -0800 Subject: [PATCH] Render: keep the automatic thread helper out of Wasm libraries --- crates/render/src/threads.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/render/src/threads.rs b/crates/render/src/threads.rs index dfd6bf757..1070c29c6 100644 --- a/crates/render/src/threads.rs +++ b/crates/render/src/threads.rs @@ -49,6 +49,7 @@ pub fn default_threads() -> u16 { /// [`default_threads`] when automatic, on `cpus` processors of which the process may use `usable` /// (0 = all). +#[cfg(any(test, not(target_arch = "wasm32")))] fn automatic_threads(cpus: usize, usable: usize) -> u16 { let cores = if usable == 0 { cpus } else { cpus.min(usable) }; (cores.saturating_sub(1)).min(8) as u16