I've played a bit and added a non-invasive change to the HQX - https://github.com/CryZe/wasmboy-rs/pull/1 - to work around the code size regression (https://github.com/rust-lang/rust/issues/74947) introduced in the latest Rust.
As a side benefit of the change, the build time also went down significantly and now takes only 1 minute altogether - including spawning Docker, fetching Cargo, building Wasm and optimising it with wasm-opt - instead of 15-20 minutes it took before.
P.S. h/t @CryZe for a very quick review & publish.
This consolidates Rust build process for various codecs into a single top-level image that is built once and reused.
This ensures that we use same version of tools across codecs (now controlled from a single place), simplifies build configs and commands, speeds up common builds and reduces disk space taken by Docker images by reusing same one.
Additionally, this PR renames all codecs to squoosh-* to work around the https://github.com/rustwasm/wasm-pack/issues/829 (which has been already fixed on master of wasm-pack but not released in a while), as well as adds `publish = false` to Cargo.toml to avoid accidental publishing for now.
I'm planning to do similar for Emscripten in a separate PR, although abilities to share configs there are much more limited due to lack of package manager in C++.
This delegates loading of Wasm modules to Webpack itself, making wrapper code simpler.
Emscripten-generated modules are still using custom loading glue as they're not compatible with Webpack.
* Scaling works on native
* It works in wasm
* Integrate with UI
* Remove benchmark
* Integrate Hqx into Resizer module
* Link against repo for hqx
* Remove unused defaultOpts
* Re-add test file
* Adding size dropdown
* Chrome: go and sit on the naughty step
* Better docs
* Review
* Add link to crbug
* Update src/codecs/processor-worker/index.ts
Co-Authored-By: Jake Archibald <jaffathecake@gmail.com>
* Terminate worker inbetween resize jobs