Fastly Compute "package size exceeds" limit in CI
Fastly Compute packages (the compiled Wasm plus metadata) have an upload size limit. When the built package is over that limit, fastly compute deploy is rejected during upload.
What this error means
The deploy fails with an error stating the package size exceeds the maximum allowed. The compiled .wasm has grown past the per-package limit.
Error: error during deploy
Caused by:
package size exceeds the maximum allowed size for a Compute packageCommon causes
A large dependency compiled into the Wasm
A heavy crate or bundled asset inflates the compiled module past the upload limit.
Debug builds and embedded assets
A non-release build keeps debug symbols, and large static files embedded into the binary push the package over the cap.
How to fix it
Build for release and strip the binary
- Build in release mode so optimizations and stripping apply.
- Remove embedded assets you can serve from object storage instead.
- Re-run the package step and check the size before deploy.
cargo build --release --target wasm32-wasi
fastly compute packTrim dependencies
Audit the dependency tree and remove or replace large crates that the Compute service does not strictly need.
How to prevent it
- Build Compute packages in release mode.
- Serve large assets from storage rather than embedding them.
- Track the compiled package size in CI to catch growth early.