#minimizing WASM code size
11 messages · Page 1 of 1 (latest)
if you mean the whole blob, it's possible to strip a whole bunch of SDK metadata
another 'trick' is to write wasm manually 🙂
take a look at this post https://dev.to/soneso/soroban-contract-with-tinygo-3hm1 written by @whole drum
a good way to reduce size is to also remove overflow checking 🙂
theres also the soroban contract optimize cmd with the soroban cli
@wary tiger yeah you have to be quite aggressive with build settings to get LTO to work
the examples we have in the soroban-examples repo are set right
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true```
you also have to have only a cdylib target type
crate-type = ["cdylib"]```