Skip to content

Commit 38d18fd

Browse files
committed
docs: add installation guide to README.md
1 parent e664c22 commit 38d18fd

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,25 @@ Automatically generated API Reference for the project can be found at https://re
1515
> [!NOTE]
1616
> Zig autodoc is in beta;
1717
> the website may be broken or incomplete.
18+
19+
## Installation
20+
21+
Add `ac-library-zig` package to your `build.zig.zon` by following command:
22+
23+
```shell
24+
# Use tagged release of ac-library-zig
25+
# Replace `<REPLACE ME>` with the version of ac-library-zig that you want to use
26+
# See: https://github.com/Ryoga-exe/ac-library-zig/releases
27+
zig fetch --save=ac-library git+https://github.com/Ryoga-exe/ac-library-zig#<REPLACE ME>
28+
29+
# Use latest build of master branch
30+
zig fetch --save=ac-library git+https://github.com/Ryoga-exe/ac-library-zig
31+
```
32+
33+
You can then import `ac-library` in your `build.zig` with:
34+
35+
```zig
36+
const ac_library = b.dependency("ac-library", .{});
37+
const exe = b.addExecutable(...);
38+
exe.root_module.addImport("ac-library", ac_library.module("ac-library"));
39+
```

0 commit comments

Comments
 (0)