-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add zig package manager instructions to README
- Loading branch information
1 parent
58a749d
commit 4c365dc
Showing
1 changed file
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,34 @@ | ||
# zigGenAlg | ||
A simple generic genetic algorithm library for zig | ||
|
||
Uses zig 0.11.0 | ||
|
||
To run example: | ||
``` | ||
git clone https://github.com/StrandedSoftwareDeveloper/zigGenAlg.git | ||
cd zigGenAlg | ||
zig build example | ||
``` | ||
Uses zig 0.11.0 | ||
|
||
To use with the zig package manager: | ||
- Add this to your build.zig.zon: | ||
``` | ||
.{ | ||
.name = "yourProjectName", | ||
.version = "your.version.number", | ||
.dependencies = .{ | ||
.genAlg = .{ | ||
.url = "https://github.com/StrandedSoftwareDeveloper/zigGenAlg/archive/<latest commit hash>.tar.gz", | ||
} | ||
}, | ||
} | ||
``` | ||
- Add this to your build.zig: | ||
``` | ||
const gen_alg_mod = b.dependency("genAlg", .{ .target = target, .optimize = optimize }).module("genAlg"); | ||
exe.addModule("genAlg", gen_alg_mod); | ||
``` | ||
- And import it with this: | ||
``` | ||
const genAlg = @import("genAlg"); | ||
``` |