From 244654abe347416d7e8a08f719630426a309d657 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 27 Aug 2026 05:17:37 +0000 Subject: [PATCH] docs: wasm32 SIMD is a shipped compile-time arm, not a future runtime tier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit simd_dispatch.rs closed its runtime-tier table with 'On wasm32 (future): tier would be WASM SIMD (128-bit, +simd128)'. Stale twice over. It is not future: crate::simd re-exports the native v128 types from simd_wasm::wasm32_simd under cfg(all(target_arch = "wasm32", target_feature = "simd128")), with a scalar fallback when simd128 is absent — and CI's wasm-simd/parity-node job builds those real types and runs a lane-vs-scalar selfcheck under node via scripts/wasm-parity.sh. Nor would it ever be a tier in THIS table, which is runtime dispatch over simd_caps(). wasm SIMD is selected at compile time; there is no runtime feature probe to dispatch on, so nothing belongs in SimdTier. Saying 'tier would be' invited a future session to add one. Docs only — no code, no cfg, no dispatch change. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv --- src/hpc/simd_dispatch.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/hpc/simd_dispatch.rs b/src/hpc/simd_dispatch.rs index 122f42cd..5dfe1035 100644 --- a/src/hpc/simd_dispatch.rs +++ b/src/hpc/simd_dispatch.rs @@ -21,7 +21,17 @@ //! | 3 | SSE2 | 128-bit | `caps.sse2` (always true on x86_64) | //! | 4 | Scalar | 1 lane | fallback | //! -//! On wasm32 (future): tier would be WASM SIMD (128-bit, `+simd128`). +//! **wasm32 is not a tier here, by construction.** The table above is +//! *runtime* dispatch over `simd_caps()`; wasm SIMD is selected at COMPILE +//! time instead — `cfg(all(target_arch = "wasm32", target_feature = +//! "simd128"))` in `crate::simd` re-exports the native 128-bit `v128` +//! types from `crate::simd_wasm::wasm32_simd`, with a full scalar fallback +//! when `simd128` is absent. There is no wasm runtime feature probe to +//! dispatch on, so nothing is added to `SimdTier`. +//! +//! That arm is shipped and CI-verified, not future work: the +//! `wasm-simd/parity-node` job builds the real `+simd128` types and runs a +//! lane-vs-scalar selfcheck under node (`scripts/wasm-parity.sh`). use super::simd_caps::simd_caps; use std::sync::LazyLock;