Initial commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const luau_dep = b.dependency("luau", .{ .target = target, .optimize = optimize, .use_zig_backend = false });
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "xsh",
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
}),
|
||||
});
|
||||
|
||||
exe.root_module.addIncludePath(b.path("src/include"));
|
||||
|
||||
exe.root_module.addImport(
|
||||
"luau",
|
||||
luau_dep.module("root"),
|
||||
);
|
||||
|
||||
b.installArtifact(exe);
|
||||
|
||||
const run = b.addRunArtifact(exe);
|
||||
|
||||
if (b.args) |args| {
|
||||
run.addArgs(args);
|
||||
}
|
||||
|
||||
const run_step = b.step(
|
||||
"run",
|
||||
"Run xsh",
|
||||
);
|
||||
|
||||
run_step.dependOn(&run.step);
|
||||
}
|
||||
Reference in New Issue
Block a user