authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-14 02:14:15 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-14 02:14:15 -08:00
log014bb96647808e86ad633d2e3127aae6d19b2b9a
tree8b6146e21097f5c48df7417592e0d7589537cded
parent09c5634a8c29bc40965a91f8db5bcc1a40c8455a

zig: add libyaml


4 files changed, 12 insertions(+), 0 deletions(-)

.circleci/config.yml+1
...@@ -25,6 +25,7 @@ jobs:...@@ -25,6 +25,7 @@ jobs:
25 - run: zig version25 - run: zig version
26 - run: zig env26 - run: zig env
27 - run: apk add jq grep27 - run: apk add jq grep
28 - run: apk add yaml-dev
28 - run: ./build_all_zig.sh29 - run: ./build_all_zig.sh
29 - store_artifacts:30 - store_artifacts:
30 path: ./zig-cache/bin/31 path: ./zig-cache/bin/
.gitmodules created+3
...@@ -0,0 +1,3 @@
1[submodule "libs/yaml"]
2 path = libs/yaml
3 url = https://github.com/yaml/libyaml
build.zig+5
...@@ -17,6 +17,11 @@ pub fn build(b: *Builder) void {...@@ -17,6 +17,11 @@ pub fn build(b: *Builder) void {
17 exe.setBuildMode(mode);17 exe.setBuildMode(mode);
18 exe.strip = true;18 exe.strip = true;
1919
20 exe.linkLibC();
21
22 exe.addIncludeDir("./libs/yaml/include");
23 exe.linkSystemLibrary("yaml");
24
20 exe.install();25 exe.install();
2126
22 const run_cmd = exe.run();27 const run_cmd = exe.run();
src/util/c.zig created+3
...@@ -0,0 +1,3 @@
1usingnamespace @cImport({
2 @cInclude("yaml.h");
3});