Skip to content

docs: wasm32 SIMD is a shipped compile-time arm, not a future runtime tier - #284

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/c64-6502-falsifier-shztkk
Aug 27, 2026
Merged

docs: wasm32 SIMD is a shipped compile-time arm, not a future runtime tier#284
AdaWorldAPI merged 1 commit into
masterfrom
claude/c64-6502-falsifier-shztkk

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

The drift

src/hpc/simd_dispatch.rs closed its runtime-tier table with:

On wasm32 (future): tier would be WASM SIMD (128-bit, +simd128).

Stale twice over, and the second half is the one that would have cost someone time.

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")) (simd.rs:402-408), with a full scalar fallback when simd128 is absent (simd.rs:416-421). U32x16 — built as [U32x4; 4] — carries Add/BitXor/rotate_left, the ARX lane the ChaCha20 backend rides.

And it is CI-verified, not merely present: the wasm-simd/parity-node job (ci.yaml:114) builds those real +simd128 types via the excluded wasm-simd-parity cdylib and runs a lane-vs-scalar numeric selfcheck under node 22 (scripts/wasm-parity.sh), plus guards that the chacha20 fork's ndarray_simd backend keeps compiling for wasm32+simd128.

Nor would it ever be a tier in this table

The more useful correction. That table is runtime dispatch over simd_caps() behind a LazyLock. wasm SIMD is selected at compile time — there is no runtime feature probe to dispatch on, so nothing belongs in SimdTier. Phrasing it as "tier would be" invited a future session to add one and discover only afterwards that the mechanism doesn't fit.

The replacement says both things: why wasm is absent from the table by construction, and where the shipped arm actually lives.

Scope

Documentation only. No code, no cfg, no dispatch change — 11 insertions, 1 deletion, one doc comment.

Gates: cargo doc --no-deps -p ndarray produces zero warnings mentioning simd_dispatch (the 111 pre-existing lib-doc warnings are untouched and unrelated); cargo fmt -p ndarray --check clean.

One thing this does not claim

The node job proves the lane bit-exact, and the chacha20 step is compile-only. No keystream-vs-RFC-8439 vectors run on wasm, so a backend-selection bug yielding a valid-looking-but-wrong keystream would pass both. Out of scope here — recorded so it isn't mistaken for covered.


Generated by Claude Code

… tier

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: efe49d4a-f7cc-4914-930e-07f15f2bce01


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Aug 27, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a72c4e09-4b51-4f37-af9e-fca093fe8586)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review August 27, 2026 05:24
@AdaWorldAPI
AdaWorldAPI merged commit 4612014 into master Aug 27, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants