Skip to content

Commit f5f3d31

Browse files
authored
Update README.md
1 parent ae7de9e commit f5f3d31

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Diff for: README.md

+25
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,31 @@ test "rgb" {
5757
try testing.expectEqual(@as(u8, 0), d.g);
5858
try testing.expectEqual(@as(u8, 0), d.b);
5959
}
60+
```
61+
62+
63+
## Installation
64+
65+
Developers tend to either use
66+
* The latest tagged release of Zig
67+
* The latest build of Zigs master branch
68+
69+
Depending on which developer you are, you need to run different `zig fetch` commands:
6070

71+
```sh
72+
# Version of mecha that works with a tagged release of Zig
73+
# Replace `<REPLACE ME>` with the version of mecha that you want to use
74+
# See: https://github.com/Hejsil/mecha/releases
75+
zig fetch --save https://github.com/Hejsil/mecha/archive/refs/tags/<REPLACE ME>.tar.gz
76+
77+
# Version of mecha that works with latest build of Zigs master branch
78+
zig fetch --save git+https://github.com/Hejsil/mecha
79+
```
80+
81+
Then add the following to `build.zig`:
82+
83+
```zig
84+
const mecha = b.dependency("mecha", .{});
85+
exe.root_module.addImport("mecha", clap.module("mecha"));
6186
```
6287

0 commit comments

Comments
 (0)