|
| 1 | +.{ |
| 2 | + .name = "zig", |
| 3 | + // This is a [Semantic Version](https://semver.org/). |
| 4 | + // In a future version of Zig it will be used for package deduplication. |
| 5 | + .version = "0.0.0", |
| 6 | + |
| 7 | + // This field is optional. |
| 8 | + // This is currently advisory only; Zig does not yet do anything |
| 9 | + // with this value. |
| 10 | + //.minimum_zig_version = "0.12.0", |
| 11 | + |
| 12 | + // This field is optional. |
| 13 | + // Each dependency must either provide a `url` and `hash`, or a `path`. |
| 14 | + // `zig build --fetch` can be used to fetch all dependencies of a package, recursively. |
| 15 | + // Once all dependencies are fetched, `zig build` no longer requires |
| 16 | + // internet connectivity. |
| 17 | + .dependencies = .{ |
| 18 | + // See `zig fetch --save <url>` for a command-line interface for adding dependencies. |
| 19 | + //.example = .{ |
| 20 | + // // When updating this field to a new URL, be sure to delete the corresponding |
| 21 | + // // `hash`, otherwise you are communicating that you expect to find the old hash at |
| 22 | + // // the new URL. |
| 23 | + // .url = "https://example.com/foo.tar.gz", |
| 24 | + // |
| 25 | + // // This is computed from the file contents of the directory of files that is |
| 26 | + // // obtained after fetching `url` and applying the inclusion rules given by |
| 27 | + // // `paths`. |
| 28 | + // // |
| 29 | + // // This field is the source of truth; packages do not come from a `url`; they |
| 30 | + // // come from a `hash`. `url` is just one of many possible mirrors for how to |
| 31 | + // // obtain a package matching this `hash`. |
| 32 | + // // |
| 33 | + // // Uses the [multihash](https://multiformats.io/multihash/) format. |
| 34 | + // .hash = "...", |
| 35 | + // |
| 36 | + // // When this is provided, the package is found in a directory relative to the |
| 37 | + // // build root. In this case the package's hash is irrelevant and therefore not |
| 38 | + // // computed. This field and `url` are mutually exclusive. |
| 39 | + // .path = "foo", |
| 40 | + |
| 41 | + // // When this is set to `true`, a package is declared to be lazily |
| 42 | + // // fetched. This makes the dependency only get fetched if it is |
| 43 | + // // actually used. |
| 44 | + // .lazy = false, |
| 45 | + //}, |
| 46 | + }, |
| 47 | + |
| 48 | + // Specifies the set of files and directories that are included in this package. |
| 49 | + // Only files and directories listed here are included in the `hash` that |
| 50 | + // is computed for this package. |
| 51 | + // Paths are relative to the build root. Use the empty string (`""`) to refer to |
| 52 | + // the build root itself. |
| 53 | + // A directory listed here means that all files within, recursively, are included. |
| 54 | + .paths = .{ |
| 55 | + // This makes *all* files, recursively, included in this package. It is generally |
| 56 | + // better to explicitly list the files and directories instead, to insure that |
| 57 | + // fetching from tarballs, file system paths, and version control all result |
| 58 | + // in the same contents hash. |
| 59 | + "", |
| 60 | + // For example... |
| 61 | + //"build.zig", |
| 62 | + //"build.zig.zon", |
| 63 | + //"src", |
| 64 | + //"LICENSE", |
| 65 | + //"README.md", |
| 66 | + }, |
| 67 | +} |
0 commit comments