Trying to compile my project (compiling pst.mo
).
$ make deploy@pst
...
Deploying: pst
All canisters have already been created.
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to install all canisters.
Caused by: Failed to install wasm module to canister 'pst'.
Caused by: Failed during wasm installation call
Caused by: The replica returned a rejection error: reject code CanisterError, reject message Error from Canister zqicb-5x777-77774-qabla-cai: Canister's Wasm module is not valid: Wasm module contains a function at index 0 with complexity 1019374 which exceeds the maximum complexity allowed 1000000..
Try breaking large functions up into multiple smaller functions. See documentation: https://internetcomputer.org/docs/current/references/execution-errors#wasm-module-function-complexity-too-high, error code Some("IC0505")
How to determine which function is at index 0?
I tried:
wasm-objdump -x .dfx/local/canisters/pst/pst.wasm
but from the output I cannot understand, which function is at index 0, because I don’t know how this index is displayed.
Is function 0 the initialization of the actor, rather than a literal func
?