cairo-native 0.9.0-rc.3

A compiler to convert Cairo's IR Sierra code to MLIR and execute it.
1
2
3
4
5
6
7
8
9
10
use zeroable::IsZeroResult;

extern fn u256_is_zero(a: u256) -> IsZeroResult<u256> implicits() nopanic;

fn run_test(value: u256) -> bool {
    match u256_is_zero(value) {
        IsZeroResult::Zero(_) => true,
        IsZeroResult::NonZero(_) => false,
    }
}