mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-09 14:14:11 +00:00
Fix #2786: the web build uses WebAssembly SIMD, so the canvas renders about 2.5x faster
Without simd128, vello_cpu's SIMD layer (fearless_simd) runs its scalar fallback on wasm32. `.cargo/config.toml` now sets `-C target-feature=+simd128` for wasm32-unknown-unknown, which trunk (packaging/web/package.sh) and `cargo xtask wasm` both pick up. A full-frame canvas render of the issue's test drawing in headless Chrome 156 drops from 7.8 to 3.2 ms at 1400 x 900 and from 8.2 to 3.2 ms at 1920 x 1080 (median of 7 and 6 alternating runs on a loaded machine). The canvas pixels are identical. The web build now needs Chrome/Edge 91+, Firefox 89+ or Safari 16.4+; older browsers can no longer load it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4ee0ef231a
commit
f3df8f34d2
@@ -1,2 +1,9 @@
|
||||
[alias]
|
||||
xtask = "run --package xtask --"
|
||||
|
||||
# WebAssembly SIMD for the web build: without it vello_cpu's SIMD layer (fearless_simd) runs its
|
||||
# scalar fallback on wasm32 and the canvas renders about 2.4x slower (#2786). The web build then
|
||||
# needs Chrome/Edge 91+, Firefox 89+ or Safari 16.4+. A RUSTFLAGS environment variable replaces
|
||||
# these flags.
|
||||
[target.wasm32-unknown-unknown]
|
||||
rustflags = ["-C", "target-feature=+simd128"]
|
||||
|
||||
Reference in New Issue
Block a user