File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ pub fn build(b: *std.Build) void {
8
8
});
9
9
const pg = b .dependency ("pg" , .{});
10
10
pgExe .root_module .addImport ("pg" , pg .module ("pg" ));
11
- pgExe .linkLibC ();
12
11
b .installArtifact (pgExe );
13
12
14
13
const libpqExe = b .addExecutable (.{
Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ const std = @import("std");
3
3
const print = std .debug .print ;
4
4
5
5
pub fn main () ! void {
6
- const allocator = std .heap .c_allocator ;
6
+ var gpa = std .heap .GeneralPurposeAllocator (.{}).init ;
7
+ const allocator = gpa .allocator ();
7
8
var pool = try pg .Pool .init (allocator , .{ .auth = .{
8
- .username = std .mem .sliceTo (std .c .getenv ("USER" ).? , 0 ),
9
+ .username = std .mem .sliceTo (std .posix .getenv ("USER" ).? , 0 ),
9
10
.database = "pgvector_zig_test" ,
10
11
} });
11
12
defer pool .deinit ();
You can’t perform that action at this time.
0 commit comments