aboutsummaryrefslogtreecommitdiff
path: root/examples/hello_world_c_zig/src/foo.zig
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello_world_c_zig/src/foo.zig')
-rw-r--r--examples/hello_world_c_zig/src/foo.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/hello_world_c_zig/src/foo.zig b/examples/hello_world_c_zig/src/foo.zig
new file mode 100644
index 0000000..464eadd
--- /dev/null
+++ b/examples/hello_world_c_zig/src/foo.zig
@@ -0,0 +1,8 @@
+const warn = @import("std").debug.warn;
+
+extern fn baz() void;
+
+export fn foo() void {
+ warn("zig called from c!\n");
+ baz();
+}