-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.zig.zon
75 lines (66 loc) · 2.95 KB
/
build.zig.zon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.{
// @descr
// Name used by packages depending on this one.
// When a user runs `zig fetch --save <url>`, this field is used as the key in the `dependencies` table.
// The user can choose a different name, but most users will stick with this value.
.name = "slate",
// @descr [Semantic Version](https://semver.org/) of the package.
.version = "0.0.0",
// @descr Minimum Zig version required to use this package
.minimum_zig_version = "0.13.0", // Optional
// @descr
// List of packages that this package depends on
// Each dependency must provide either:
// 1. A `path` field for local dependencies
// 2. An `url`+`hash` field pair for remote dependencies
// @note See the bottom of the file for more details about each.
// .dependencies = .{ // Optional
// .zstd = .{ .path = "./src/lib/zstd", },
// },
// @descr
// Set of files and directories included in this package (relative to the build root).
// A directory means that all files within, recursively, are included. The empty string (`""`) refers to the build root itself.
// @note
// Only listed files and directories are included in the package's `hash`.
// Only listed files will remain on disk when using the zig package manager.
.paths = .{
// Buildsystem
"build.zig", "build.zig.zon",
// Source Code
"src/zig", // Add everything inside folder ./src/zig/*
// Documentation
"license.md",
"readme.md",
},
}
//________________________________________________
// @section Documentation: Dependencies
//______________________________________
// Remote Dependencies:
// Running `zig build --fetch` will download all remote dependencies.
// Internet conectivity won't be required after that.
// See `zig fetch --save <url>` for a command-line interface for adding dependencies.
//
// .dependencies = .{
// .example = .{
// // Be sure to delete the corresponding `hash` when updating this field to a new URL.
// // Otherwise you are communicating that you expect to find the old hash at the new URL.
// .url = "https://example.com/foo.tar.gz",
//
// // The `hash` is the only source of truth;
// // Packages do not come from a `url`, they come from a `hash`.
// // - `url` is just one of many possible mirrors for how to obtain a package matching this `hash`.
// // - The hash is computed from the file contents of the directory of files that is obtained after fetching `url`
// // and applying the inclusion rules given by `paths`.
// // - Uses the [multihash](https://multiformats.io/multihash/) format.
// .hash = "...",
//
// // When this is provided, the package is found in a directory relative to the build root.
// // In this case the package's hash is irrelevant and therefore not computed.
// // `path` and `url` are mutually exclusive.
// .path = "foo",
//
// // When `lazy` is set to `true`, the dependency will only get fetched when/if it is actually used.
// .lazy = false,
// },
// },