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
11
12
13
14
15
use array::ArrayTrait;
use traits::TryInto;
use core::option::OptionTrait;

fn felt_to_bool(x: felt252) -> bool {
    x.try_into().unwrap() == 1_u8
}

fn program(a: bool, b: bool) -> bool {
    a && b
}

fn run_test(a: felt252, b: felt252) -> bool {
    program(felt_to_bool(a), felt_to_bool(b))
}