diff options
Diffstat (limited to 'doc/interoperability/rust-from-c/foo/foo.rs')
-rw-r--r-- | doc/interoperability/rust-from-c/foo/foo.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/interoperability/rust-from-c/foo/foo.rs b/doc/interoperability/rust-from-c/foo/foo.rs new file mode 100644 index 0000000..65cbffc --- /dev/null +++ b/doc/interoperability/rust-from-c/foo/foo.rs @@ -0,0 +1,4 @@ +#[no_mangle] +pub extern "C" fn foo(x: i32) -> i32 { + return x.abs(); +} |