This document records the optimized WASM build command for ILN smart contracts and the current size guidance for the generated binaries.
cargo build --release --target wasm32-unknown-unknownThe repository also exposes a Makefile shortcut:
make soroban-optimize- Optimized Soroban contract binaries are expected to be small, typically in the range of 10 KB to 80 KB per contract when built with the release profile.
- Actual size should be verified after building with the command above.
After building, check the size of the generated WASM file:
wc -c target/wasm32-unknown-unknown/release/<contract>.wasmor
stat -c%s target/wasm32-unknown-unknown/release/<contract>.wasm