diff --git a/README.md b/README.md index d7ecda1..094e582 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,21 @@ version of zig-clap that targets a specific Zig release, have a look at the releases. Each release specifies the Zig version it compiles with in the release notes. +## Installation + +First, run the following: + +``` +zig fetch --save git+https://github.com/Hejsil/zig-clap +``` + +Then add the following to `build.zig`: + +```zig +const clap = b.dependency("clap", .{}); +exe.root_module.addImport("clap", clap.module("clap")); +``` + ## Features * Short arguments `-a` diff --git a/example/README.md.template b/example/README.md.template index b296ca3..87832ee 100644 --- a/example/README.md.template +++ b/example/README.md.template @@ -10,6 +10,21 @@ version of zig-clap that targets a specific Zig release, have a look at the releases. Each release specifies the Zig version it compiles with in the release notes. +## Installation + +First, run the following: + +``` +zig fetch --save git+https://github.com/Hejsil/zig-clap +``` + +Then add the following to `build.zig`: + +```zig +const clap = b.dependency("clap", .{{}}); +exe.root_module.addImport("clap", clap.module("clap")); +``` + ## Features * Short arguments `-a`