From 5006226e945fc645e6d9b21252c9eee53cc191cc Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 23 Sep 2018 12:22:37 +0200 Subject: Fix various things, add generated zig header files to global include Fix compile_commands.json missing build steps. Fix c includes -> zig includes flags. Fix crash when running sibs new/init without defining lang. Add generated zig header files to global include so they can be used from c/c++. Add zig and zig/c (using zig and c in the same project) examples. --- examples/hello_world_zig/.gitignore | 5 +++++ examples/hello_world_zig/project.conf | 5 +++++ examples/hello_world_zig/src/main.zig | 6 ++++++ 3 files changed, 16 insertions(+) create mode 100644 examples/hello_world_zig/.gitignore create mode 100644 examples/hello_world_zig/project.conf create mode 100644 examples/hello_world_zig/src/main.zig (limited to 'examples/hello_world_zig') diff --git a/examples/hello_world_zig/.gitignore b/examples/hello_world_zig/.gitignore new file mode 100644 index 0000000..636c6b9 --- /dev/null +++ b/examples/hello_world_zig/.gitignore @@ -0,0 +1,5 @@ +# Compiled sibs files +sibs-build/ +compile_commands.json +tests/sibs-build/ +tests/compile_commands.json diff --git a/examples/hello_world_zig/project.conf b/examples/hello_world_zig/project.conf new file mode 100644 index 0000000..6ad2e1b --- /dev/null +++ b/examples/hello_world_zig/project.conf @@ -0,0 +1,5 @@ +[package] +name = "hello_world_zig" +type = "executable" +version = "0.1.0" +platforms = ["any"] diff --git a/examples/hello_world_zig/src/main.zig b/examples/hello_world_zig/src/main.zig new file mode 100644 index 0000000..c74a3de --- /dev/null +++ b/examples/hello_world_zig/src/main.zig @@ -0,0 +1,6 @@ +const warn = @import("std").debug.warn; + +pub fn main() void +{ + warn("Hello, world!\n"); +} -- cgit v1.2.3