this repo has no description
1const std = @import("std");
2
3pub fn build(b: *std.Build) void {
4 const target = b.standardTargetOptions(.{});
5 const optimize = b.standardOptimizeOption(.{});
6
7 const mod = b.addModule("spacez", .{
8 .root_source_file = b.path("src/spacez.zig"),
9 .target = target,
10 .optimize = optimize,
11 });
12
13 const tests = b.addTest(.{ .root_module = mod });
14 const run_tests = b.addRunArtifact(tests);
15 const test_step = b.step("test", "run unit tests");
16 test_step.dependOn(&run_tests.step);
17
18 const demo = b.addExecutable(.{
19 .name = "spacez-demo",
20 .root_module = b.createModule(.{
21 .root_source_file = b.path("examples/demo.zig"),
22 .target = target,
23 .optimize = optimize,
24 .imports = &.{.{ .name = "spacez", .module = mod }},
25 }),
26 });
27 b.installArtifact(demo);
28
29 const run_demo = b.addRunArtifact(demo);
30 run_demo.step.dependOn(b.getInstallStep());
31 const run_step = b.step("run", "run the demo");
32 run_step.dependOn(&run_demo.step);
33
34 const ner_exe = b.addExecutable(.{
35 .name = "spacez-ner",
36 .root_module = b.createModule(.{
37 .root_source_file = b.path("examples/ner.zig"),
38 .target = target,
39 .optimize = optimize,
40 .imports = &.{.{ .name = "spacez", .module = mod }},
41 }),
42 });
43 b.installArtifact(ner_exe);
44
45 const ner_step = b.step("ner", "build the NER CLI");
46 ner_step.dependOn(b.getInstallStep());
47
48 const dump_exe = b.addExecutable(.{
49 .name = "spacez-dump",
50 .root_module = b.createModule(.{
51 .root_source_file = b.path("examples/dump_tokvecs.zig"),
52 .target = target,
53 .optimize = optimize,
54 .imports = &.{.{ .name = "spacez", .module = mod }},
55 }),
56 });
57 b.installArtifact(dump_exe);
58
59 const xval = b.addExecutable(.{
60 .name = "spacez-xval",
61 .root_module = b.createModule(.{
62 .root_source_file = b.path("examples/cross_validate.zig"),
63 .target = target,
64 .optimize = optimize,
65 .imports = &.{.{ .name = "spacez", .module = mod }},
66 }),
67 });
68 b.installArtifact(xval);
69
70 const run_xval = b.addRunArtifact(xval);
71 run_xval.step.dependOn(b.getInstallStep());
72 const xval_step = b.step("xval", "cross-validate tokenizer against spaCy");
73 xval_step.dependOn(&run_xval.step);
74}