diff --git a/docs/deps.zig.md b/docs/deps.zig.md new file mode 100644 index 0000000000000000000000000000000000000000..9f9c280888e391e443cce9b23769c4e5b90485cd --- /dev/null +++ b/docs/deps.zig.md @@ -0,0 +1,50 @@ +## `deps.zig` Reference +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. + +### `cache` +- Type: `[]const u8` +The relative path root to which all dependency sources are saved. Currently always `.zigmod/deps`. + +### `addAllTo` +- Type: `pub fn (exe: *build.LibExeObjStep) void` +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. + +### `_ids` +- Type: `[][]const u8` +A comptime-known string array of all of the [ID's](zig.mod.md#id) used in this project. + +### `_paths` +- Type: `[][]const u8` +A comptime-known string array of the source paths to each dependency relative to `cache`. + +### `package_data` +- Type: `struct` +This is a meta struct that associates ID's to their relavant `std.build.Pkg` initialization, complete with sub-packages and all. + +### `packages` +- Type: `[]std.build.Pkg` +This is a an array of all of the items in `package_data`, but able to be referenced by index, rather than package ID. + +### `pkgs` +- Type: `struct` +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: +```zig +const deps = @import("./deps.zig"); +const my_dev_dep = @import(deps.pkgs.my_dev_dep.path); +``` + +### `c_include_dirs` +- Type: `[][]const u8` +An ensembled list of all the `c_include_dirs` lists. + +### `c_source_flags` +- Type: `struct` +An ensembled list of all the `c_source_flags` lists. + +### `c_source_files` +- Type: `[][2][]const u8` +An ensembled list of all the `c_source_files` lists. + +### `system_libs` +- Type: `[][]const u8` +An ensembled list of all the `system_libs` lists.