mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
* wip * doh, whitespace * Updating emscripten, restoring export name * Updating oxipng * Build wasm * Fix oxipng; upgrade Rust * More v2-codec integration * AVIF now working * Non-working JXL * Build hqx with Rust 1.40; refactor build-rust*.sh * Set web target * wp2 wip * wp2 decode options * Better logo height when loading the logo into squoosh * Build oxi * JAKE IS AN IDIOT * wip oxipng * Fixing case sensitive imports * adding log * another log * Abort tasks when compress component removed * Adding progressive option to JXL * Fix bug going to & from original image * Exposing epf in jxl * logs * Bypass initial CSS plugin * Revert "logs" * Adding root * Fix for finding TSC on Windows * Use spawn again * Converting to module paths * Remove spawnP * silly * oops * logs * Fixing glob paths in CSS plugin * Path normalising * Normalise paths for CSS plugin * Normalise again * Use correct func * Adding lossless mode and near lossless (but hidden in UI) * Removing useless comments * Some logging * Update JXL to v0.1. (#846) * Rebuild JXL * Adding slight loss option Co-authored-by: Ingvar Stepanyan <rreverser@google.com> Co-authored-by: Luca Versari <veluca93@gmail.com>
20 lines
981 B
Docker
20 lines
981 B
Docker
ARG RUST_IMG=rust:1.47
|
|
|
|
FROM emscripten/emsdk:2.0.8 AS wasm-tools
|
|
WORKDIR /opt/wasm-tools
|
|
RUN wget -qO- https://github.com/rustwasm/wasm-pack/releases/download/v0.9.1/wasm-pack-v0.9.1-x86_64-unknown-linux-musl.tar.gz | tar -xzf - --strip 1
|
|
|
|
FROM $RUST_IMG AS rust
|
|
ARG RUST_IMG
|
|
RUN rustup target add wasm32-unknown-unknown
|
|
RUN if [[ $RUST_IMG = rustlang/rust:* ]] ; then rustup component add rust-src ; fi
|
|
COPY --from=wasm-tools /emsdk/upstream/bin/wasm-opt /emsdk/upstream/bin/clang /usr/local/bin/
|
|
COPY --from=wasm-tools /emsdk/upstream/lib/ /usr/local/lib/
|
|
COPY --from=wasm-tools /emsdk/upstream/emscripten/system/include/libc/ /wasm32/include/
|
|
COPY --from=wasm-tools /emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten/bits/ /wasm32/include/bits/
|
|
COPY --from=wasm-tools /opt/wasm-tools/wasm-pack /usr/local/cargo/bin/
|
|
|
|
ENV CPATH="/wasm32/include"
|
|
WORKDIR /src
|
|
CMD ["sh", "-c", "rm -rf pkg && wasm-pack build --target web -- --verbose --locked && rm pkg/.gitignore"]
|