Hey! Is there any chance for CloudFlare Workers to support compression algorithms other than just gz

Hey! Is there any chance for CloudFlare Workers to support compression algorithms other than just gzip?

We provide a library for developers which has a Rust core compiled to WASM. Currently, gzip is able to compress 3MB WASM module into roughly 1.2MB. We have exhausted all options of compressing the code size on our end (like dependency reduction, unused code elimination, etc). Considering other options, we noticed that LZMA and ZSTD algorithms provide us with 800KB and 770KB WASM modules respectively, which is very promising. Our target is roughly 800KB.

CloudFlare Workers do not allow to run WASM code generated in runtime, so we cannot just unpack the WASM module in runtime ourselves and run it. An ugly alternative to that is including a WASM runtime of our own (like wasm3) and running WASM inside WASM. We would like to avoid that, but this is the only option we have at the moment.

Thus, we are wondering if native support for compressed WASM modules can be added to the platform.
Was this page helpful?