| ... | ... | @@ -0,0 +1,50 @@ |
| 1 | ## `deps.zig` Reference |
| 2 | This file is generated by [`zigmod fetch`](commands/fetch.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 [`zig.mod`](zig.mod.md) but contain those values for the entire tree. |
| 3 | |
| 4 | ### `cache` |
| 5 | - Type: `[]const u8` |
| 6 | The relative path root to which all dependency sources are saved. Currently always `.zigmod/deps`. |
| 7 | |
| 8 | ### `addAllTo` |
| 9 | - Type: `pub fn (exe: *build.LibExeObjStep) void` |
| 10 | A 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. |
| 11 | |
| 12 | ### `_ids` |
| 13 | - Type: `[][]const u8` |
| 14 | A comptime-known string array of all of the [ID's](zig.mod.md#id) used in this project. |
| 15 | |
| 16 | ### `_paths` |
| 17 | - Type: `[][]const u8` |
| 18 | A comptime-known string array of the source paths to each dependency relative to `cache`. |
| 19 | |
| 20 | ### `package_data` |
| 21 | - Type: `struct<ID, std.build.Pkg>` |
| 22 | This is a meta struct that associates ID's to their relavant `std.build.Pkg` initialization, complete with sub-packages and all. |
| 23 | |
| 24 | ### `packages` |
| 25 | - Type: `[]std.build.Pkg` |
| 26 | This is a an array of all of the items in `package_data`, but able to be referenced by index, rather than package ID. |
| 27 | |
| 28 | ### `pkgs` |
| 29 | - Type: `struct<NAME, std.build.Pkg>` |
| 30 | This is a struct that associates the package name to the relavant `std.build.Pkg`. The only packages listed are the dependencies of the root project. Additionally, the data here can be referenced to use dependencies at build time in `build.zig` through importing the path of the project like so: |
| 31 | ```zig |
| 32 | const deps = @import("./deps.zig"); |
| 33 | const my_dev_dep = @import(deps.pkgs.my_dev_dep.path); |
| 34 | ``` |
| 35 | |
| 36 | ### `c_include_dirs` |
| 37 | - Type: `[][]const u8` |
| 38 | An ensembled list of all the `c_include_dirs` lists. |
| 39 | |
| 40 | ### `c_source_flags` |
| 41 | - Type: `struct<ID, []const u8>` |
| 42 | An ensembled list of all the `c_source_flags` lists. |
| 43 | |
| 44 | ### `c_source_files` |
| 45 | - Type: `[][2][]const u8` |
| 46 | An ensembled list of all the `c_source_files` lists. |
| 47 | |
| 48 | ### `system_libs` |
| 49 | - Type: `[][]const u8` |
| 50 | An ensembled list of all the `system_libs` lists. |