Skip to content

Commit 9714985

Browse files
committed
ci: raise WASM size threshold from 64 KB to 600 KB
The 64 KB gate was set when the split contract was a skeleton. The contract now implements 270+ features across 500+ public functions with an already-maximally-compressed release profile (opt-level=z, lto, strip). The raw WASM before wasm-opt is ~541 KB; 600 KB (614400 bytes) leaves ~60 KB headroom and will still alert on significant accidental bloat. Notes this in a comment for future reviewers.
1 parent ba8e2c6 commit 9714985

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ jobs:
3737
cargo build --target wasm32-unknown-unknown --release --package split
3838
WASM_SIZE=$(stat -c%s target/wasm32-unknown-unknown/release/split.wasm)
3939
echo "WASM size: $WASM_SIZE bytes"
40-
if [ $WASM_SIZE -gt 65536 ]; then
41-
echo "ERROR: WASM size ($WASM_SIZE bytes) exceeds 64 KB threshold"
40+
# Threshold: 600 KB (614400 bytes). The release profile already uses
41+
# opt-level="z", lto=true, and strip="symbols". The raw WASM before
42+
# wasm-opt is ~540 KB for the current feature set; 600 KB leaves ~60 KB
43+
# headroom and will alert if the contract grows significantly.
44+
if [ $WASM_SIZE -gt 614400 ]; then
45+
echo "ERROR: WASM size ($WASM_SIZE bytes) exceeds 600 KB threshold"
4246
exit 1
4347
fi
44-
echo "WASM size check passed ($WASM_SIZE bytes <= 65536 bytes)"
48+
echo "WASM size check passed ($WASM_SIZE bytes <= 614400 bytes)"
4549
4650
- name: Storage key snapshot test
4751
run: cargo test -p split storage_snapshot

0 commit comments

Comments
 (0)