No bullshit, no unstable rust, no big-size WASM, no cargo casper
.
Compile to optimal-size WASM with:
cargo build --release --target wasm32-unknown-unknown
wasm-opt -Oz --strip-debug --signext-lowering ./target/wasm32-unknown-unknown/release/casper_example_contract.wasm -o ./casper_example_contract.wasm
It might be included implicitly - even though your code declares #[no_std]
- so make sure your code is truly no_std
compatible:
rustup target add thumbv7m-none-eabi
cargo build --target thumbv7m-none-eabi
For example, contract that calls Risc0 ZKVM for verification is 20KB only, but it must be done right 😉.