diff options
Diffstat (limited to '')
-rw-r--r-- | test cases/rust/15 polyglot sharedlib/adder.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test cases/rust/15 polyglot sharedlib/adder.rs b/test cases/rust/15 polyglot sharedlib/adder.rs new file mode 100644 index 0000000..9095350 --- /dev/null +++ b/test cases/rust/15 polyglot sharedlib/adder.rs @@ -0,0 +1,9 @@ +#[repr(C)] +pub struct Adder { + pub number: i32 +} + +#[no_mangle] +pub extern fn adder_add(a: &Adder, number: i32) -> i32 { + return a.number + number; +} |