~phroa/jmap

eed1c2a71c399b38bbc4bf6ac40564a7ef1d19c1 — Jack Stratton 5 months ago e4823ed
move to zfetch
6 files changed, 17 insertions(+), 3 deletions(-)

M .gitignore
M .gitmodules
M build.zig
D ext/hzzp
A gyro.zzz
M src/main.zig
M .gitignore => .gitignore +3 -0
@@ 1,2 1,5 @@
zig-cache
zig-out
gyro.lock
.gyro
deps.zig

M .gitmodules => .gitmodules +3 -0
@@ 1,3 1,6 @@
[submodule "ext/hzzp"]
	path = ext/hzzp
	url = https://github.com/truemedian/hzzp
[submodule "ext/zfetch"]
	path = ext/zfetch
	url = https://github.com/truemedian/zfetch

M build.zig => build.zig +3 -2
@@ 1,4 1,5 @@
const std = @import("std");
const pkgs = @import("deps.zig").pkgs;

pub fn build(b: *std.build.Builder) void {
    // Standard release options allow the person running `zig build` to select


@@ 7,12 8,12 @@ pub fn build(b: *std.build.Builder) void {

    const lib = b.addStaticLibrary("jmap", "src/main.zig");
    lib.setBuildMode(mode);
    lib.addPackage(.{.name = "hzzp", .path = "ext/hzzp/src/main.zig"});
    pkgs.addAllTo(lib);
    lib.install();

    var main_tests = b.addTest("src/main.zig");
    main_tests.setBuildMode(mode);
    main_tests.addPackage(.{.name = "hzzp", .path = "ext/hzzp/src/main.zig"});
    pkgs.addAllTo(main_tests);

    const test_step = b.step("test", "Run library tests");
    test_step.dependOn(&main_tests.step);

D ext/hzzp => ext/hzzp +0 -1
@@ 1,1 0,0 @@
Subproject commit 8beb46f247ecd4febd97f9f48953935d24d3e155

A gyro.zzz => gyro.zzz +7 -0
@@ 0,0 1,7 @@
deps:
  zfetch:
    src:
      github:
        user: truemedian
        repo: zfetch
        ref: master

M src/main.zig => src/main.zig +1 -0
@@ 1,4 1,5 @@
const std = @import("std");
const zfetch = @import("zfetch");
const testing = std.testing;

export fn add(a: i32, b: i32) i32 {