@@ -3,50 +3,62 @@ const std = @import("std");
33pub fn build (b : * std.Build ) void {
44 const pgExe = b .addExecutable (.{
55 .name = "pg" ,
6- .root_source_file = b .path ("examples/pg.zig" ),
7- .target = b .graph .host ,
6+ .root_module = b .createModule (.{
7+ .root_source_file = b .path ("examples/pg.zig" ),
8+ .target = b .graph .host ,
9+ }),
810 });
911 const pg = b .dependency ("pg" , .{});
1012 pgExe .root_module .addImport ("pg" , pg .module ("pg" ));
1113 b .installArtifact (pgExe );
1214
1315 const libpqExe = b .addExecutable (.{
1416 .name = "libpq" ,
15- .root_source_file = b .path ("examples/libpq.zig" ),
16- .target = b .graph .host ,
17+ .root_module = b .createModule (.{
18+ .root_source_file = b .path ("examples/libpq.zig" ),
19+ .target = b .graph .host ,
20+ }),
1721 });
1822 libpqExe .linkSystemLibrary ("pq" );
1923 libpqExe .linkLibC ();
2024 b .installArtifact (libpqExe );
2125
2226 const openaiExe = b .addExecutable (.{
2327 .name = "openai" ,
24- .root_source_file = b .path ("examples/openai.zig" ),
25- .target = b .graph .host ,
28+ .root_module = b .createModule (.{
29+ .root_source_file = b .path ("examples/openai.zig" ),
30+ .target = b .graph .host ,
31+ }),
2632 });
2733 openaiExe .root_module .addImport ("pg" , pg .module ("pg" ));
2834 b .installArtifact (openaiExe );
2935
3036 const cohereExe = b .addExecutable (.{
3137 .name = "cohere" ,
32- .root_source_file = b .path ("examples/cohere.zig" ),
33- .target = b .graph .host ,
38+ .root_module = b .createModule (.{
39+ .root_source_file = b .path ("examples/cohere.zig" ),
40+ .target = b .graph .host ,
41+ }),
3442 });
3543 cohereExe .root_module .addImport ("pg" , pg .module ("pg" ));
3644 b .installArtifact (cohereExe );
3745
3846 const hybridExe = b .addExecutable (.{
3947 .name = "hybrid" ,
40- .root_source_file = b .path ("examples/hybrid.zig" ),
41- .target = b .graph .host ,
48+ .root_module = b .createModule (.{
49+ .root_source_file = b .path ("examples/hybrid.zig" ),
50+ .target = b .graph .host ,
51+ }),
4252 });
4353 hybridExe .root_module .addImport ("pg" , pg .module ("pg" ));
4454 b .installArtifact (hybridExe );
4555
4656 const sparseExe = b .addExecutable (.{
4757 .name = "sparse" ,
48- .root_source_file = b .path ("examples/sparse.zig" ),
49- .target = b .graph .host ,
58+ .root_module = b .createModule (.{
59+ .root_source_file = b .path ("examples/sparse.zig" ),
60+ .target = b .graph .host ,
61+ }),
5062 });
5163 sparseExe .root_module .addImport ("pg" , pg .module ("pg" ));
5264 b .installArtifact (sparseExe );
0 commit comments