Skip to content

Commit d95508d

Browse files
committed
Moved example to examples directory [skip ci]
1 parent b64c700 commit d95508d

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
make
1818
sudo make install
1919
- run: zig build
20-
- run: zig-out/bin/example
20+
- run: zig-out/bin/libpq

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const res = pg.PQexec(conn, "CREATE INDEX ON items USING ivfflat (embedding vect
5858

5959
Use `vector_ip_ops` for inner product and `vector_cosine_ops` for cosine distance
6060

61-
See a [full example](example.zig)
61+
See a [full example](examples/libpq.zig)
6262

6363
## Contributing
6464

@@ -76,7 +76,7 @@ git clone https://github.com/pgvector/pgvector-zig.git
7676
cd pgvector-zig
7777
createdb pgvector_zig_test
7878
zig build
79-
zig-out/bin/example
79+
zig-out/bin/libpq
8080
```
8181

8282
Specify the path to libpq if needed:

build.zig

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
const std = @import("std");
22

33
pub fn build(b: *std.Build) void {
4-
const exe = b.addExecutable(.{
5-
.name = "example",
6-
.root_source_file = b.path("example.zig"),
4+
const libpqExe = b.addExecutable(.{
5+
.name = "libpq",
6+
.root_source_file = b.path("examples/libpq.zig"),
77
.target = b.graph.host,
88
});
9-
10-
exe.linkSystemLibrary("pq");
11-
exe.linkLibC();
12-
13-
b.installArtifact(exe);
9+
libpqExe.linkSystemLibrary("pq");
10+
libpqExe.linkLibC();
11+
b.installArtifact(libpqExe);
1412
}
File renamed without changes.

0 commit comments

Comments
 (0)