Skip to content

Commit cf1ddaa

Browse files
committed
Update to zig 0.16.0
1 parent f5d158c commit cf1ddaa

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This is a Zig wrapper for [TA-LIB](http://ta-lib.org).
1010
zig fetch --save "git+https://github.com/ta-lib/ta-lib-zig#main"
1111
```
1212

13-
2) In your `build.zig`, add the `httpz` module as a dependency you your program:
13+
2) In your `build.zig`, add the `ta-lib` module as a dependency you your program:
1414

1515
```zig
1616
const ta_lib = b.dependency("ta_lib", .{

build.zig

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ pub fn build(b: *std.Build) void {
44
const target = b.standardTargetOptions(.{});
55
const optimize = b.standardOptimizeOption(.{});
66

7-
const mod = b.createModule(.{
7+
const mod = b.addModule("ta_lib", .{
88
.root_source_file = b.path("src/root.zig"),
99
.target = target,
1010
.optimize = optimize,
11+
.link_libc = true,
1112
});
13+
mod.linkSystemLibrary("ta-lib", .{});
1214

1315
const lib = b.addLibrary(.{
1416
.name = "ta-lib",
1517
.root_module = mod,
1618
.linkage = .static,
1719
});
18-
lib.linkSystemLibrary("ta-lib");
19-
lib.linkLibC();
2020

2121
b.installArtifact(lib);
2222

@@ -31,8 +31,6 @@ pub fn build(b: *std.Build) void {
3131
const tests = b.addTest(.{
3232
.root_module = mod,
3333
});
34-
tests.linkSystemLibrary("ta-lib");
35-
tests.linkLibC();
3634

3735
const run_tests = b.addRunArtifact(tests);
3836

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.{
22
.name = .ta_lib,
33
.version = "0.0.1",
4-
.minimum_zig_version = "0.15.1",
4+
.minimum_zig_version = "0.16.0",
55
.paths = .{""},
66
.fingerprint = 0x40034da37ce4afda,
77
}

0 commit comments

Comments
 (0)