Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 827 Bytes

File metadata and controls

34 lines (22 loc) · 827 Bytes

WASM Binary Size

This document records the optimized WASM build command for ILN smart contracts and the current size guidance for the generated binaries.

Optimized build command

cargo build --release --target wasm32-unknown-unknown

The repository also exposes a Makefile shortcut:

make soroban-optimize

Current WASM size guidance

  • 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.

Verification

After building, check the size of the generated WASM file:

wc -c target/wasm32-unknown-unknown/release/<contract>.wasm

or

stat -c%s target/wasm32-unknown-unknown/release/<contract>.wasm