| ... | @@ -14,12 +14,18 @@ As Zig is still in development itself, if you plan to contribute to Zigmod you w | ... | @@ -14,12 +14,18 @@ As Zig is still in development itself, if you plan to contribute to Zigmod you w |
| 14 | You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source. | 14 | You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source. |
| 15 | | 15 | |
| 16 | ### Build Zigmod from source | 16 | ### Build Zigmod from source |
| 17 | Assuming you have Zig master installed, | 17 | Zigmod partially uses itself to manage dependencies but can be bootstrapped with the 2 (two) included Git submodules. The first step will generate a build of Zigmod that only has the `fetch` command. This binary can then be used to grab the rest of the dependencies and generate a full build. |
| | 18 | |
| 18 | ``` | 19 | ``` |
| 19 | $ git clone https://github.com/nektro/zigmod --recursive | 20 | $ git clone https://github.com/nektro/zigmod --recursive |
| 20 | $ cd zigmod | 21 | $ cd zigmod |
| 21 | $ zig build -Dbootstrap | 22 | $ zig build -Dbootstrap |
| 22 | $ ./zig-out/bin/zigmod fetch | 23 | $ ./zig-out/bin/zigmod fetch |
| | 24 | ``` |
| | 25 | |
| | 26 | Now that we made our bootstrap build and have the rest of our dependencies, we can build as normal. |
| | 27 | |
| | 28 | ``` |
| 23 | $ zig build | 29 | $ zig build |
| 24 | $ ./zig-out/bin/zigmod | 30 | $ ./zig-out/bin/zigmod |
| 25 | ``` | 31 | ``` |
| ... | @@ -40,6 +46,10 @@ $ zig init-exe | ... | @@ -40,6 +46,10 @@ $ zig init-exe |
| 40 | $ zigmod init | 46 | $ zigmod init |
| 41 | ``` | 47 | ``` |
| 42 | | 48 | |
| | 49 | You will also want to add `/.zigmod` and `/deps.zig` to your `.gitignore`. |
| | 50 | |
| | 51 | Then run `zigmod fetch`. After that you will be ready to integrate Zigmod with your existing `build.zig` which you can learn how to do [here](commands/fetch.md). |
| | 52 | |
| 43 | ## Principles | 53 | ## Principles |
| 44 | Zigmod is but a prototype and not the official Zig package manager. As such I wanted to lay out some of the guiding principles learned/used when making the project. You can find that document [here](./principles.md). | 54 | Zigmod is but a prototype and not the official Zig package manager. As such I wanted to lay out some of the guiding principles learned/used when making the project. You can find that document [here](./principles.md). |
| 45 | | 55 | |