From 7a51c11319b3892b81784149fb2cb2915073710c Mon Sep 17 00:00:00 2001 From: 12ball Date: Sat, 8 Jun 2024 14:27:10 -0500 Subject: Add installation instructions to README --- README.md | 15 +++++++++++++++ example/README.md.template | 15 +++++++++++++++ 2 files changed, 30 insertions(+) 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` -- cgit v1.2.3