mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:36:22 -04:00
fix(zig): make usable as a zig dependency
Make this usable as a dependency of a zig 0.12 project: - build.zig.zon must exist to be used as a zig dependency - public headers need to be installed as part of the artifact
This commit is contained in:
parent
8040baed18
commit
32cfceec62
|
|
@ -12,5 +12,7 @@ pub fn build(b: *std.Build) void {
|
|||
lib.addIncludePath(.{ .path = "lib/include" });
|
||||
lib.addIncludePath(.{ .path = "lib/src" });
|
||||
|
||||
lib.installHeadersDirectory(b.path("lib/include"), ".", .{});
|
||||
|
||||
b.installArtifact(lib);
|
||||
}
|
||||
|
|
|
|||
10
build.zig.zon
Normal file
10
build.zig.zon
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
.{
|
||||
.name = "tree-sitter",
|
||||
.version = "0.22.5",
|
||||
.paths = .{
|
||||
"build.zig",
|
||||
"build.zig.zon",
|
||||
"lib/src",
|
||||
"lib/include",
|
||||
},
|
||||
}
|
||||
Loading…
Reference in a new issue