summaryrefslogtreecommitdiff
path: root/doc/interoperability/c-from-rust/foo/foo.c
diff options
context:
space:
mode:
authorAlberto Sartori <alberto.sartori@huawei.com>2024-07-23 17:24:16 +0200
committerAlberto Sartori <alberto.sartori@huawei.com>2024-07-24 13:06:28 +0200
commite7f2fc92c8fd64485d635b1cc7b0c2897d78bc69 (patch)
treea464901b31e83daafcbfb8049debeab732d4e6d0 /doc/interoperability/c-from-rust/foo/foo.c
parentd5426a260d88d90c8f275557d8f5ae8e1a55d367 (diff)
downloadrules-rust-e7f2fc92c8fd64485d635b1cc7b0c2897d78bc69.tar.gz
rules-rust: add interoperability tutorials
Diffstat (limited to 'doc/interoperability/c-from-rust/foo/foo.c')
-rw-r--r--doc/interoperability/c-from-rust/foo/foo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/interoperability/c-from-rust/foo/foo.c b/doc/interoperability/c-from-rust/foo/foo.c
new file mode 100644
index 0000000..e419fa4
--- /dev/null
+++ b/doc/interoperability/c-from-rust/foo/foo.c
@@ -0,0 +1,7 @@
+#include <math.h>
+
+#include "foo/foo.h"
+
+int c_func(int x){
+ return sqrt(x*x);
+}