summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGravatar Kitty-Cricket Piapiac2023-08-04 20:34:17 -0700
committerGravatar Vincent Rischmann2023-08-05 18:04:40 +0200
commit601df42c3a9a9cf4a6b76435293706a90a782fe2 (patch)
tree8b0ba6bf46f3eb5221162a509d4187a64e8ace94 /README.md
parentremove gyro.zzz (diff)
downloadzig-sqlite-601df42c3a9a9cf4a6b76435293706a90a782fe2.tar.gz
zig-sqlite-601df42c3a9a9cf4a6b76435293706a90a782fe2.tar.xz
zig-sqlite-601df42c3a9a9cf4a6b76435293706a90a782fe2.zip
README.md: official package manager
Diffstat (limited to 'README.md')
-rw-r--r--README.md25
1 files changed, 24 insertions, 1 deletions
diff --git a/README.md b/README.md
index 993232c..eaaf626 100644
--- a/README.md
+++ b/README.md
@@ -71,10 +71,33 @@ For sqlite, you have options depending on your target:
71 71
72# Installation 72# Installation
73 73
74There are two primary ways to include `zig-sqlite` in your project: 74There are three main ways to include `zig-sqlite` in your project:
75* using zig's official package manager
75* using the [zigmod](https://github.com/nektro/zigmod) package manager 76* using the [zigmod](https://github.com/nektro/zigmod) package manager
76* using a git submodule 77* using a git submodule
77 78
79## Official package manager
80
81Add this as one of the `.dependencies` inside your `build.zig.zon` file:
82```zig
83.sqlite = .{
84 .url = "https://github.com/vrischmann/zig-sqlite/archive/COMMIT.tar.gz",
85},
86```
87
88Now in your `build.zig` you can access the module like this:
89```zig
90const sqlite = b.dependency("sqlite", .{
91 .target = target,
92 .optimize = optimize,
93});
94
95exe.addModule("sqlite", sqlite.module("sqlite"));
96
97// links the bundled sqlite3, so leave this out if you link the system one
98exe.linkLibrary(sqlite.artifact("sqlite"));
99```
100
78## zigmod 101## zigmod
79 102
80Add this to your `zig.mod` file: 103Add this to your `zig.mod` file: