Skip to content

build(wasm): SIMD (-msimd128), on by default - #2

Merged
rusoleal merged 1 commit into
mainfrom
feat/wasm-simd
Nov 20, 2026
Merged

rusoleal merged 1 commit into
mainfrom
feat/wasm-simd

Conversation

@rusoleal

Copy link
Copy Markdown
Owner

WebAssembly builds now compile with SIMD (-msimd128). It's on by default, since every browser with WebGPU supports it.

  • A new *_WASM_SIMD option turns it off.
  • Under Emscripten it adds directory-wide compile and link options, so the library and any third-party code it builds get SIMD.
  • The main target passes -msimd128 on to consumers as an INTERFACE compile and link option. The final link needs it, so that wasm-opt accepts the SIMD instructions.
  • Native builds are unaffected (if(EMSCRIPTEN ...) only).

Verified with campello_web_viewer built against this branch and the other Campello libraries' SIMD branches (all local):

  • 446 of 453 compile rules carry -msimd128. The rest are links of third-party tools the viewer doesn't ship.
  • The final wasm has 63,555 SIMD instructions (0 before) and is 10.29 MB (10.06 MB before).
  • In Edge (WebGPU), skinning, material variants and file cameras render as before.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rusoleal
rusoleal merged commit 4c5a319 into main Nov 20, 2026
24 checks passed
@rusoleal
rusoleal deleted the feat/wasm-simd branch November 20, 2026 18:25
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.

1 participant