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