Remy2701/ansi
Library to manipulate ansi codes in zig!
This library provides abstraction to write ANSI codes, this allows you to
Clone this repository in your libs folder.
git clone https://github.com/Remy2701/ansi
Then add the following line in the build.zig
:
const ansi = @import("libs/ansi/build.zig");
pub fn build(b: *Build) !void {
...
exe.addModule("ansi", ansi.module(b));
}
const std = @import("std");
const ansi = @import("ansi");
pub fn main() void {
std.debug.print("Hello, {}{}World{}!\n", .{
ansi.Graphics.bold(),
ansi.Foreground.blue(),
ansi.Graphics.reset()
});
}