aboutsummaryrefslogtreecommitdiff
path: root/doc/usage/invoke.rs
blob: 0ae90d2343bb217f74a95315e809662e69e465c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#[func]
fn compute(x: i32) -> i32 {
    x * 2
}

#[func]
fn example() -> i32 {
    // invoke! macro should be used with #[func]
    invoke!(compute(5))
}