initial commit

This commit is contained in:
Rokas Puzonas 2024-10-01 23:33:56 +03:00
commit 035fdb4568
4 changed files with 44 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
zig-cache
zig-out

29
build.zig Normal file
View File

@ -0,0 +1,29 @@
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "http.c",
.target = target,
.optimize = optimize,
});
exe.addCSourceFile(.{
.file = b.path("src/main.c"),
.flags = &.{}
});
exe.linkLibC();
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);
}

7
build.zig.zon Normal file
View File

@ -0,0 +1,7 @@
.{
.name = "http.c",
.version = "0.1.0",
.minimum_zig_version = "0.12.0",
.dependencies = .{ },
.paths = .{ "" },
}

6
src/main.c Normal file
View File

@ -0,0 +1,6 @@
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}