diff --git a/docs/deps.zig.md b/docs/deps.zig.md index 2c11c30c7b3d440a690fec057612b20efacac039..28bd67e24eee5fa2426a570429171f25136ce172 100644 --- a/docs/deps.zig.md +++ b/docs/deps.zig.md @@ -1,5 +1,5 @@ ## `deps.zig` Reference -This 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 [`zig.mod`](zig.mod.md) but contain those values for the entire dependency tree. +This 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. ### `cache` - Type: `[]const u8` @@ -18,6 +18,7 @@ pub const Package = struct { c_source_files: []const string = &.{}, c_source_flags: []const string = &.{}, system_libs: []const string = &.{}, + vcpkg: bool = false, }; ``` diff --git a/docs/principles.md b/docs/principles.md index 36a39a7796c9ef3079d25d08631e87f2a3912b91..278069411ccb2c953108c316364b683231a36611 100644 --- a/docs/principles.md +++ b/docs/principles.md @@ -2,7 +2,7 @@ Zigmod is a prototype package manager for Zig. An official one will eventually be made so I wanted to add this page to the docs to go over some of the guiding principles used in this project. Some are general good practice for app development but there will be added context in how they apply to making a package manager. ### 1. Be declarative -`zig.mod` is a static Yaml file that does not contain any Zig code. Placing packages' definition in its own file (say as opposed to in `build.zig`) was an intentional decision from the start to not allow packages to run arbitrary code on the developer's machine. A maintainer's computer is an arguably much more high risk attack surface so the trust of code should be kept to a minimum. Given that the environment may contain API/ssh/etc keys that provide access to things far wider than just the user's computer. +`zigmod.yml` is a static Yaml file that does not contain any Zig code. Placing packages' definition in its own file (say as opposed to in `build.zig`) was an intentional decision from the start to not allow packages to run arbitrary code on the developer's machine. A maintainer's computer is an arguably much more high risk attack surface so the trust of code should be kept to a minimum. Given that the environment may contain API/ssh/etc keys that provide access to things far wider than just the user's computer. ### 2. Be Immutable/Avoid the network as much as possible The network is slow and unreliable. So we should cache only what we need and avoid fetching unchanged data. This is achieved from a user's perspective by using versions on your dependencies that dont change. For example tags or commits when using git, or specifying a hash when using http. diff --git a/docs/zig.mod.md b/docs/zig.mod.md index f570a6aaf02e72ea6de27b192397f6f1922f5284..a8cdd8dee907c04f7af5e1b2af767b686a7d4131 100644 --- a/docs/zig.mod.md +++ b/docs/zig.mod.md @@ -48,11 +48,11 @@ This is a list of `Dep` objects. `Dep` objects are how you include the other peo ### `root_dependencies` - Type: `[]Dep` -Similar to `dependencies` but will only get added to the project if the current `zig.mod` is the root module. +Similar to `dependencies` but will only get added to the project if the current `zigmod.yml` is the root module. ### `build_dependencies` - Type: `[]Dep` -Similar to `dependencies` but will only get added to the project if the current `zig.mod` is the root module. Exposed in `deps.zig` through the `deps.imports` decl. +Similar to `dependencies` but will only get added to the project if the current `zigmod.yml` is the root module. Exposed in `deps.zig` through the `deps.imports` decl. ### `min_zig_version` - Type: `string` @@ -127,4 +127,4 @@ This attribute is a manual override for having an external repo that contains no This attribute is a flag to call `try exe.addVcpkgPaths(.static);` when on Windows. Likely used in conjunction with adding system libraries/C code. `true` is the only value that will enable this flag. #### Dep Overrides -There are a number of fields you can add to a `Dep` object that will override it's top-level value. This is most useful in the case where a project you want to use does not have a `zig.mod` manifest. You can then use overrides to define the values for them. The only top-level value you can not override is `dependencies`. +There are a number of fields you can add to a `Dep` object that will override it's top-level value. This is most useful in the case where a project you want to use does not have a `zigmod.yml` manifest. You can then use overrides to define the values for them. The only top-level value you can not override is `dependencies`.