1## `deps.zig` Reference
2This file is generated by [`zigmod fetch`](commands/fetch.md) or [`zigmod ci`](commands/ci.md) and is an amalgamation of all of the sources and dependencies used in this project. Many of the fields listed here align with fields present in [`zigmod.yml`](zig.mod.md) but contain those values for the entire dependency tree.
3
4### `cache`
5- Type: `[]const u8`
6The relative path root to which all dependency sources are saved. Currently always `.zigmod/deps`.
7> Note: only available when made with `zigmod fetch`.
8
9### `skip_libc`
10- Type: `bool`
11Bool if you want `deps.zig` to skip calling `linkLibC()` for you. Defaults to `false`.
12
13### `fetch`
14- Type: `pub fn (exe: *std.build.LibExeObjStep) void`
15A helper function to automatically pull in dependencies, purely from the `zig build` system without the need to have `zigmod` installed.
16> Note: only available when made with `zigmod generate`.
17
18### `addAllTo`
19- Type: `pub fn (exe: *std.build.LibExeObjStep) void`
20A helper function to add all of the packages, C files, and system libraries to the passed exectuable. It will also automatically link libC in the event that any C files are found in the dependency tree.
21
22### `Package`
23```zig
24pub const Package = struct {
25 directory: string,
26 pkg: ?Pkg = null,
27 c_include_dirs: []const string = &.{},
28 c_source_files: []const string = &.{},
29 c_source_flags: []const string = &.{},
30 system_libs: []const string = &.{},
31 frameworks: []const string = &.{},
32};
33```
34
35### `package_data`
36- Type: `struct<ID, Package>`
37This is a meta struct that associates ID's to their relavant `Package` definition.
38
39### `packages`
40- Type: `[]Package`
41This is a an array of all of the items in `package_data`, but only contains the final versions of `dev_dependencies`.
42
43### `pkgs`
44- Type: `struct<NAME, Package>`
45This is a struct that associates the package name to the relavant `Package`. The only packages listed are the dependencies of the root project.
46
47### `imports`
48- Type: `struct<NAME, @import(main)>`
49This is a struct that contains the imports of your `dev_dependencies`. Added in response to [zig#2206](https://github.com/ziglang/zig/issues/2206).