authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-05-04 13:11:08 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-05-04 13:11:08 -07:00
log407a70207ee818f6920096f40779e3fb52db49b0
tree900f0c40bacf61bf2fa31234a971c50ed33a108c
parentac607e4e7ac36d46cc67c8786262578330543a36

upgrade to 0.11


3 files changed, 28 insertions(+), 28 deletions(-)

build.zig+12-15
...@@ -1,27 +1,24 @@...@@ -1,27 +1,24 @@
1const Builder = @import("std").build.Builder;1const std = @import("std");
2const Builder = std.build.Builder;
23
3pub fn build(b: *Builder) void {4pub fn build(b: *Builder) void {
4 // Standard target options allows the person running `zig build` to choose
5 // what target to build for. Here we do not override the defaults, which
6 // means any target is allowed, and the default is native. Other options
7 // for restricting supported target set are available.
8 const target = b.standardTargetOptions(.{});5 const target = b.standardTargetOptions(.{});
6 const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug;
97
10 // Standard release options allow the person running `zig build` to select8 const exe = b.addExecutable(.{
11 // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.9 .name = "zig-ansi",
12 const mode = b.standardReleaseOptions();10 .root_source_file = .{ .path = "src/main.zig" },
11 .target = target,
12 .optimize = mode,
13 });
14 b.installArtifact(exe);
1315
14 const exe = b.addExecutable("zig-ansi", "src/main.zig");16 const run_cmd = b.addRunArtifact(exe);
15 exe.setTarget(target);
16 exe.setBuildMode(mode);
17 exe.install();
18
19 const run_cmd = exe.run();
20 run_cmd.step.dependOn(b.getInstallStep());17 run_cmd.step.dependOn(b.getInstallStep());
21 if (b.args) |args| {18 if (b.args) |args| {
22 run_cmd.addArgs(args);19 run_cmd.addArgs(args);
23 }20 }
2421
25 const run_step = b.step("run", "Run the app");22 const run_step = b.step("test", "Run the app");
26 run_step.dependOn(&run_cmd.step);23 run_step.dependOn(&run_cmd.step);
27}24}
licenses.txt created+3
...@@ -0,0 +1,3 @@
1MIT:
2= https://spdx.org/licenses/MIT
3- This
src/main.zig+13-13
...@@ -3,19 +3,19 @@ const std = @import("std");...@@ -3,19 +3,19 @@ const std = @import("std");
3const ansi = @import("./lib.zig");3const ansi = @import("./lib.zig");
44
5pub fn main() anyerror!void {5pub fn main() anyerror!void {
6 std.debug.warn(comptime ansi.color.Fg(.Red, "All your codebase are belong to us.\n"), .{});6 std.debug.print(comptime ansi.color.Fg(.Red, "All your codebase are belong to us.\n"), .{});
7 std.debug.warn(comptime ansi.color.Fg(.Green, "All your codebase are belong to us.\n"), .{});7 std.debug.print(comptime ansi.color.Fg(.Green, "All your codebase are belong to us.\n"), .{});
8 std.debug.warn(comptime ansi.color.Fg(.Yellow, "All your codebase are belong to us.\n"), .{});8 std.debug.print(comptime ansi.color.Fg(.Yellow, "All your codebase are belong to us.\n"), .{});
9 std.debug.warn(comptime ansi.color.Fg(.Blue, "All your codebase are belong to us.\n"), .{});9 std.debug.print(comptime ansi.color.Fg(.Blue, "All your codebase are belong to us.\n"), .{});
10 std.debug.warn(comptime ansi.color.Fg(.Magenta, "All your codebase are belong to us.\n"), .{});10 std.debug.print(comptime ansi.color.Fg(.Magenta, "All your codebase are belong to us.\n"), .{});
11 std.debug.warn(comptime ansi.color.Fg(.Cyan, "All your codebase are belong to us.\n"), .{});11 std.debug.print(comptime ansi.color.Fg(.Cyan, "All your codebase are belong to us.\n"), .{});
1212
13 std.debug.warn("\n", .{});13 std.debug.print("\n", .{});
1414
15 std.debug.warn(comptime ansi.color.Bg(.Red, "All your codebase are belong to us.\n"), .{});15 std.debug.print(comptime ansi.color.Bg(.Red, "All your codebase are belong to us.\n"), .{});
16 std.debug.warn(comptime ansi.color.Bg(.Green, "All your codebase are belong to us.\n"), .{});16 std.debug.print(comptime ansi.color.Bg(.Green, "All your codebase are belong to us.\n"), .{});
17 std.debug.warn(comptime ansi.color.Bg(.Yellow, "All your codebase are belong to us.\n"), .{});17 std.debug.print(comptime ansi.color.Bg(.Yellow, "All your codebase are belong to us.\n"), .{});
18 std.debug.warn(comptime ansi.color.Bg(.Blue, "All your codebase are belong to us.\n"), .{});18 std.debug.print(comptime ansi.color.Bg(.Blue, "All your codebase are belong to us.\n"), .{});
19 std.debug.warn(comptime ansi.color.Bg(.Magenta, "All your codebase are belong to us.\n"), .{});19 std.debug.print(comptime ansi.color.Bg(.Magenta, "All your codebase are belong to us.\n"), .{});
20 std.debug.warn(comptime ansi.color.Bg(.Cyan, "All your codebase are belong to us.\n"), .{});20 std.debug.print(comptime ansi.color.Bg(.Cyan, "All your codebase are belong to us.\n"), .{});
21}21}