summaryrefslogtreecommitdiff
path: root/tests/projects/rust/cxx_call_rust_library/src/foo.rs
blob: f78bfa99d359fbfc9b984b66f8db427e760d453e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#[cxx::bridge]
mod foo {
    extern "Rust" {
        fn add(a: i32, b: i32) -> i32;
    }
}

pub fn add(a: i32, b: i32) -> i32 {
    return a + b;
}