mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
Porting over few more improvements from #777 that can be applied to HQX despite the older Rust version: - Removed Cargo.lock from .gitignore (the file itself was added in the original PR, but is still ignored and wouldn't get committed on changes). - Removed couple of stray .DS_Store accidentally added in that PR. - Added a `--locked` to `wasm-pack` build to make sure we rebuild HQX with the same versions from Cargo.lock. - Removed separate `wasm-strip` and `wasm-opt -Os` steps from build.sh in HQX because they're already included in wasm-pack, and running twice only makes build slower.
12 lines
473 B
Docker
12 lines
473 B
Docker
# This is intentionally an old version of Rust. Newer versions
|
|
# generate _significantly_ bigger Wasm binaries.
|
|
FROM rust:1.37
|
|
RUN rustup target add wasm32-unknown-unknown
|
|
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
|
|
RUN mkdir /opt/binaryen && \
|
|
curl -L https://github.com/WebAssembly/binaryen/releases/download/1.38.32/binaryen-1.38.32-x86-linux.tar.gz | tar -xzf - -C /opt/binaryen --strip 1
|
|
|
|
ENV PATH="/opt/binaryen:${PATH}"
|
|
WORKDIR /src
|