cairo-native 0.2.6

A compiler to convert Cairo's intermediate representation Sierra code to MLIR.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn fib(n: felt252) -> felt252 {
    if n == 0 {
        1
    } else if n == 1 {
        1
    } else {
        fib(n - 1) + fib(n - 2)
    }
}

fn main() -> (felt252, felt252, felt252) {
    (
        fib(0),
        fib(1),
        // Careful increasing this, each increment roughly doubles runtime
        fib(10),
    )
}