pub fn _g(id: u32, maxiter: u32)
Expand description
Guard function
Each time a loop appears in your code a call to this must be
the first branch instruction in wasm binary after the beginning of the loop.
In order to achieve this in Rust use the while
loop with expression block.
ยงExample
let mut i = 0;
while {
_g(UNIQUE_GUARD_ID, MAXITER + 1);
i < MAXITER
} {
// your code
i += 1;
}