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