authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-04-18 15:44:11 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-04-18 15:44:11 -07:00
loga7a440fd557ba5601a60c8d5a74d2a39e605149d
tree89748e4f56e6a3ffe3fe4b48f9eb8742f869bfb3
parente80729e3e6d208e97293c65f49424739af8902a1

docs/tutorial- lowercase your


1 files changed, 4 insertions(+), 4 deletions(-)

docs/tutorial.md+4-4
...@@ -45,11 +45,11 @@ dependencies:...@@ -45,11 +45,11 @@ dependencies:
45 - src: git https://github.com/jecolon/ziglyph45 - src: git https://github.com/jecolon/ziglyph
46```46```
4747
48Here I assume that you initialized Your project with `zig init-exe` or `zig init-lib`, so Your `build.zig` the `addExecutable()` or `addStaticLibrary()` call points to `src/main.zig`.48Here I assume that you initialized your project with `zig init-exe` or `zig init-lib`, so your `build.zig` the `addExecutable()` or `addStaticLibrary()` call points to `src/main.zig`.
4949
50In this case you can `@import("ziglyph")` in `src/lib.zig`, but not in `src/main.zig`. However you can `@import("my-package")` in `src/main.zig`.50In this case you can `@import("ziglyph")` in `src/lib.zig`, but not in `src/main.zig`. However you can `@import("my-package")` in `src/main.zig`.
5151
52Please note, that using `zig init-exe` or `zig init-lib` for creating a project does not mean that you have to use `zigmod init` in application or library mode. Creating a `zigmod.yml` file with proper `name` and `main` only makes Your package importable by other projects. This is usually not needed with applications, but quite useful in case of libraries; hence the name.52Please note, that using `zig init-exe` or `zig init-lib` for creating a project does not mean that you have to use `zigmod init` in application or library mode. Creating a `zigmod.yml` file with proper `name` and `main` only makes your package importable by other projects. This is usually not needed with applications, but quite useful in case of libraries; hence the name.
5353
54### Zig and Zigmod package handling explained54### Zig and Zigmod package handling explained
5555
...@@ -78,9 +78,9 @@ root (src/main.zig)...@@ -78,9 +78,9 @@ root (src/main.zig)
7878
79It is very important to understand, that `my-package` is _below_ `root`, as `name/main` in `zigmod.yml` will create a separate package (it will not be chained to `root`).79It is very important to understand, that `my-package` is _below_ `root`, as `name/main` in `zigmod.yml` will create a separate package (it will not be chained to `root`).
8080
81If you want to use the dependencies from `root`, then make sure that Your `zigmod.yml` does _not_ contain a `main` line **and** use `root_dependencies` instead of `dependencies`. This is what `zigmod init` does in application mode.81If you want to use the dependencies from `root`, then make sure that your `zigmod.yml` does _not_ contain a `main` line **and** use `root_dependencies` instead of `dependencies`. This is what `zigmod init` does in application mode.
8282
83On the other hand using `root_dependencies` and `dependencies` is not mutually exclusive, you can take advantage of using both, like zigmod does. Using `dependencies` requires a proper `main` field in Your `zigmod.yml`.83On the other hand using `root_dependencies` and `dependencies` is not mutually exclusive, you can take advantage of using both, like zigmod does. Using `dependencies` requires a proper `main` field in your `zigmod.yml`.
8484
85## Running `zigmod fetch`85## Running `zigmod fetch`
86This command will inspect your `zigmod.yml` and download any new dependencies as well as pulling updates for any ones already download. It will recursively do this for your entire tree until it is full constructed which will culminate in the generation of two output files: `deps.zig` and `zigmod.lock`.86This command will inspect your `zigmod.yml` and download any new dependencies as well as pulling updates for any ones already download. It will recursively do this for your entire tree until it is full constructed which will culminate in the generation of two output files: `deps.zig` and `zigmod.lock`.