Is there a git tag naming convention or requirement for Zig libraries?

For example, in Go modules are required to have a specific version tag format (v1.2.3).

Is there such a requirement in Zig? If I’m creating a library should I create git tags like v1.2.3 or is just 1.2.3 ok?

If there isn’t a strict requirement, is there a convention that most libraries follow?

None. Post must be at least 10 characters.

2 Likes

Zig packages are pinned to a commit hash. When you fetch them, you can use tags or branch references to fetch them, but then those are resolved to a specific hash and saved.

It doesn’t matter what the tag is named. Either is fine. Or you can use your own.

There’s definitely no requirement, and I haven’t noticed a convention. My personal favourite is v1.2.3, the Zig compiler repo uses 1.2.3. Do whatever feels best to you, it’s your repo and I doubt Zig will ever enforce a specific format.