aboutsummaryrefslogtreecommitdiff
path: root/examples/add.rs
blob: 8ff8676ccec15061127eb139f2061ebb13e2fcd5 (plain) (blame)
1
2
3
4
5
6
7
#[no_mangle]
pub extern "C" fn add(a: isize, b: isize) -> isize {
    a + b
}

// to compile:
// rustc --crate-type cdylib add.rs