mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
I only observed ~10-15% increase in perf on single-threaded bench, which isn't much, but no harm in adding flag anyway. Fixes #833.
12 lines
436 B
Bash
Executable File
12 lines
436 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
rm -rf pkg,{-parallel}
|
|
export CFLAGS="${CFLAGS} -DUNALIGNED_ACCESS_IS_FAST=1"
|
|
wasm-pack build -t web
|
|
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory' wasm-pack build -t web -d pkg-parallel -- -Z build-std=panic_abort,std --features=parallel
|
|
# Workaround https://github.com/rustwasm/wasm-bindgen/issues/2133:
|
|
sed -i "s|maybe_memory:|maybe_memory?:|" pkg-parallel/squoosh_oxipng.d.ts
|
|
rm pkg{,-parallel}/.gitignore
|