1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00

initial commit after adding facilio dep

This commit is contained in:
Rene Schallner 2023-01-11 11:57:38 +01:00
commit 3996a60d5f
5 changed files with 33 additions and 0 deletions

2
.gitignore vendored Normal file
View file

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

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "deps/facilio"]
path = deps/facilio
url = https://github.com/boazsegev/facil.io.git

17
build.zig Normal file
View file

@ -0,0 +1,17 @@
const std = @import("std");
pub fn build(b: *std.build.Builder) void {
// Standard release options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
const mode = b.standardReleaseOptions();
const lib = b.addStaticLibrary("zap", "src/main.zig");
lib.setBuildMode(mode);
lib.install();
const main_tests = b.addTest("src/main.zig");
main_tests.setBuildMode(mode);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
}

1
deps/facilio vendored Submodule

@ -0,0 +1 @@
Subproject commit 063c9bb86e14bae7441d2e37ab7207d9839a98ce

10
src/main.zig Normal file
View file

@ -0,0 +1,10 @@
const std = @import("std");
const testing = std.testing;
export fn add(a: i32, b: i32) i32 {
return a + b;
}
test "basic add functionality" {
try testing.expect(add(3, 7) == 10);
}