Init
This commit is contained in:
commit
e70a04ac16
19 changed files with 576 additions and 0 deletions
35
build.zig
Normal file
35
build.zig
Normal file
|
@ -0,0 +1,35 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const zap_dep = b.dependency("zap", .{});
|
||||
|
||||
const lib_mod = b.addModule("craftflut", .{
|
||||
.root_source_file = b.path("src/root.zig"),
|
||||
});
|
||||
lib_mod.addImport("zap", zap_dep.module("zap"));
|
||||
|
||||
const exe_mod = b.createModule(.{
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
exe_mod.addImport("craftflut", lib_mod);
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "craftflut",
|
||||
.root_module = exe_mod,
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
|
||||
const run_cmd = b.addRunArtifact(exe);
|
||||
run_cmd.step.dependOn(b.getInstallStep());
|
||||
if (b.args) |args| {
|
||||
run_cmd.addArgs(args);
|
||||
}
|
||||
|
||||
const run_step = b.step("run", "Run the app");
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue