File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- zig-cache
1+ zig- *
2+ .zig- *
Original file line number Diff line number Diff line change 11const std = @import ("std" );
22
33pub fn build (b : * std.Build ) void {
4+ const target = b .standardTargetOptions (.{});
5+ const optimize = b .standardOptimizeOption (.{});
6+
47 _ = b .addModule ("diffz" , .{
58 .root_source_file = b .path ("DiffMatchPatch.zig" ),
69 });
10+
11+ const lib = b .addStaticLibrary (.{
12+ .name = "diffz" ,
13+ .root_source_file = b .path ("DiffMatchPatch.zig" ),
14+ .target = target ,
15+ .optimize = optimize ,
16+ });
17+
18+ // This declares intent for the library to be installed into the standard
19+ // location when the user invokes the "install" step (the default step when
20+ // running `zig build`).
21+ b .installArtifact (lib );
22+
23+ // Run tests
24+ const tests = b .addTest (.{
25+ .name = "tests" ,
26+ .root_source_file = b .path ("DiffMatchPatch.zig" ),
27+ .target = target ,
28+ .optimize = optimize ,
29+ });
30+ const step_tests = b .addRunArtifact (tests );
31+
32+ b .step ("test" , "Run diffz tests" ).dependOn (& step_tests .step );
733}
Original file line number Diff line number Diff line change 1+ .{
2+ .name = "DiffMatchPatch" ,
3+ .version = "0.0.1" ,
4+ .paths = .{
5+ "DiffMatchPatch.zig" ,
6+ "LICENSE" ,
7+ "README.md" ,
8+ "build.zig.zon" ,
9+ "build.zig" ,
10+ },
11+ }
You can’t perform that action at this time.
0 commit comments