zig init-exe

This commit is contained in:
Luna 2019-09-18 11:20:09 -03:00
parent 106ee3afe5
commit c46229154c
3 changed files with 20 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
zig-cache/

14
build.zig Normal file
View file

@ -0,0 +1,14 @@
const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("rayoko", "src/main.zig");
exe.setBuildMode(mode);
exe.install();
const run_cmd = exe.run();
run_cmd.step.dependOn(b.getInstallStep());
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
}

5
src/main.zig Normal file
View file

@ -0,0 +1,5 @@
const std = @import("std");
pub fn main() anyerror!void {
std.debug.warn("All your base are belong to us.\n");
}