-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
In practice, manifest files are not only used by the build system/ package manager itself but also by other tools that consume them, e.g. for the generation of SBOMs (e.g. CycloneDX, SPDX) or a package registry (e.g. Zigistry). I propose to extend the build.zig.zon by the following optional top-level fields to allow maintainers to communicate certain properties of their packages more precisely. While there are other means of obtaining some of the data (e.g. reading the .git/config, trying to derive the license from a file as done by Github, etc.) having a standardized format makes the inspection of Zig packages less error prone. The proposed fields are also common in other manifests, e.g., gemspec or Cargo.toml.
license
String. Optional.
The license MUST be a valid SPDX license expression. This is a de facto standard used by the most common SBOM formats CycloneDX and SPDX, as well as other tool like the REUSE-tool.
The most common expression would contain just an identifier, e.g.
.license = "MIT",
... but more complex expressions are also supported:
.license = "Apache-2.0 AND (MIT OR GPL-2.0-only)",
authors
List. Optional.
A list of authors for the given package.
An optional email address is specified between angle brackets following the authors name.
Usage:
.authors = .{ "John Smith", "Max Musterman <[email protected]>" },
Note: this field is marked deprecated in the
Cargo.tomlspec because of the mutability of the manifest (at least that's what I read).
repository
String. Optional.
The URL of the package repository.
Usage:
.repository = "https://github.com/r4gus/zbor",
documentation
String. Optional.
The URL of the package documentation.
Usage:
.documentation = "https://docs.zml.ai/misc/zml_api/",
summary
String. Optional.
A small summary of the package. For a longer description see description.
Usage:
.summary = "This is a small summary of my package",
description
String. Optional.
A long description of the package. It should be more detailed than the summary.
Usage:
.description =
\\ The descriptions shouldn't be longer
\\ than a few sentences.
,
Let me know what you think.