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