]> gitweb.ps.run Git - iftint.zig/blob - build.zig.zon
initial
[iftint.zig] / build.zig.zon
1 .{
2     // This is the default name used by packages depending on this one. For
3     // example, when a user runs `zig fetch --save <url>`, this field is used
4     // as the key in the `dependencies` table. Although the user can choose a
5     // different name, most users will stick with this provided value.
6     //
7     // It is redundant to include "zig" in this name because it is already
8     // within the Zig package namespace.
9     .name = .default,
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 = "0.0.0",
13     // Together with name, this represents a globally unique package
14     // identifier. This field is generated by the Zig toolchain when the
15     // package is first created, and then *never changes*. This allows
16     // unambiguous detection of one package being an updated version of
17     // another.
18     //
19     // When forking a Zig project, this id should be regenerated (delete the
20     // field and run `zig build`) if the upstream project is still maintained.
21     // Otherwise, the fork is *hostile*, attempting to take control over the
22     // original project's identity. Thus it is recommended to leave the comment
23     // on the following line intact, so that it shows up in code reviews that
24     // modify the field.
25     .fingerprint = 0xe35e00df11111111, // Changing this has security and trust implications.
26     // Tracks the earliest Zig version that the package considers to be a
27     // supported use case.
28     .minimum_zig_version = "0.15.2",
29     // This field is optional.
30     // Each dependency must either provide a `url` and `hash`, or a `path`.
31     // `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
32     // Once all dependencies are fetched, `zig build` no longer requires
33     // internet connectivity.
34     .dependencies = .{
35         // See `zig fetch --save <url>` for a command-line interface for adding dependencies.
36         //.example = .{
37         //    // When updating this field to a new URL, be sure to delete the corresponding
38         //    // `hash`, otherwise you are communicating that you expect to find the old hash at
39         //    // the new URL. If the contents of a URL change this will result in a hash mismatch
40         //    // which will prevent zig from using it.
41         //    .url = "https://example.com/foo.tar.gz",
42         //
43         //    // This is computed from the file contents of the directory of files that is
44         //    // obtained after fetching `url` and applying the inclusion rules given by
45         //    // `paths`.
46         //    //
47         //    // This field is the source of truth; packages do not come from a `url`; they
48         //    // come from a `hash`. `url` is just one of many possible mirrors for how to
49         //    // obtain a package matching this `hash`.
50         //    //
51         //    // Uses the [multihash](https://multiformats.io/multihash/) format.
52         //    .hash = "...",
53         //
54         //    // When this is provided, the package is found in a directory relative to the
55         //    // build root. In this case the package's hash is irrelevant and therefore not
56         //    // computed. This field and `url` are mutually exclusive.
57         //    .path = "foo",
58         //
59         //    // When this is set to `true`, a package is declared to be lazily
60         //    // fetched. This makes the dependency only get fetched if it is
61         //    // actually used.
62         //    .lazy = false,
63         //},
64     },
65     // Specifies the set of files and directories that are included in this package.
66     // Only files and directories listed here are included in the `hash` that
67     // is computed for this package. Only files listed here will remain on disk
68     // when using the zig package manager. As a rule of thumb, one should list
69     // files required for compilation plus any license(s).
70     // Paths are relative to the build root. Use the empty string (`""`) to refer to
71     // the build root itself.
72     // A directory listed here means that all files within, recursively, are included.
73     .paths = .{
74         "build.zig",
75         "build.zig.zon",
76         "src",
77         // For example...
78         //"LICENSE",
79         //"README.md",
80     },
81 }