mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 05:50:35 +00:00
⚡ Enable wasm SIMD for Skia render-wasm builds (#12145)
Link with -msimd128 and point SKIA_BINARIES_URL at the pdf+simd prebuilt archive.
This commit is contained in:
parent
051f01d559
commit
accea1abde
@ -20,7 +20,7 @@ fi
|
||||
export BUILD_NAME="${BUILD_NAME:-render-wasm}"
|
||||
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
||||
export CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-"target/$RENDER_TARGET"};
|
||||
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.93.1/skia-binaries-319323662b1685a112f5-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp.tar.gz"}
|
||||
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.93.1/skia-binaries-319323662b1685a112f5-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp-pdf-simd.tar.gz"}
|
||||
|
||||
# 256 MB of initial heap to perform less
|
||||
# initial calls to memory grow.
|
||||
@ -39,8 +39,12 @@ export EM_MEMORY_GROWTH_GEOMETRIC_STEP="0.8"
|
||||
# Default: dlmalloc
|
||||
export EM_MALLOC="dlmalloc"
|
||||
|
||||
# -msimd128: allow wasm SIMD in the linked module. Skia prebuilts must be
|
||||
# built with the same flag (penpot/skia-binaries, WASM_SIMD=1) for Skia/skcms
|
||||
# kernels to actually contain v128 ops; engines do not autovec scalar wasm.
|
||||
export EMCC_CFLAGS="--no-entry \
|
||||
--js-library src/js/wapi.js \
|
||||
-msimd128 \
|
||||
-sMALLOC=$EM_MALLOC \
|
||||
-sINVOKE_RUN=0 \
|
||||
-sALLOW_TABLE_GROWTH=0 \
|
||||
|
||||
@ -11,7 +11,7 @@ fi
|
||||
. ./_build_env frontend
|
||||
|
||||
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
||||
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.93.1/skia-binaries-319323662b1685a112f5-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp.tar.gz"}
|
||||
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.93.1/skia-binaries-319323662b1685a112f5-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp-pdf-simd.tar.gz"}
|
||||
|
||||
|
||||
ALLOWED_RULES="-D static_mut_refs"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user