diff options
Diffstat (limited to 'examples/hello_world_c_zig/src/main.c')
-rw-r--r-- | examples/hello_world_c_zig/src/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/hello_world_c_zig/src/main.c b/examples/hello_world_c_zig/src/main.c new file mode 100644 index 0000000..aeaeae4 --- /dev/null +++ b/examples/hello_world_c_zig/src/main.c @@ -0,0 +1,14 @@ +#include <stdio.h> +#include <zig/src/foo.h> + +void baz() +{ + printf("c called from zig!\n"); +} + +int main(int argc, char **argv) +{ + printf("inside c\n"); + foo(); + return 0; +} |