diff --git a/.gitignore b/.gitignore index bf65da380a..9643f24cbf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ *.so *.so.* *.a +zig-cache/ diff --git a/build.zig b/build.zig new file mode 100644 index 0000000000..beddf7809f --- /dev/null +++ b/build.zig @@ -0,0 +1,20 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const lib = b.addStaticLibrary(.{ + .name = "mir", + .target = target, + .optimize = optimize, + }); + lib.disable_sanitize_c = true; + lib.linkLibC(); + lib.addCSourceFiles(&.{ + "mir.c", + "mir-gen.c", + }, &.{}); + + b.installArtifact(lib); +}