Zig NEWS

Cover image for Zig Package Aggregator
Felix "xq" Queißner
Felix "xq" Queißner

Posted on

Zig Package Aggregator

Hello!

Did you ever ask yourself:

Did someone already implement a Zig package for that?

Well, i tried to answer this question for everyone and created a package aggregator on zig.pm!

You can find packages from all over the place there, including GitHub, aquila.red and astrolabe.pm.

How can i add my package to the index?

If you have your package online on GitHub, please add the zig-package topic to your repository.

Otherwise, you can also publish your package via aquila.red or astrolabe.pm.

If enough people establish this topic/tag on other sites like sr.ht or codeberg, we can add these sources to the index, too!

How can i access it?

The package index provides an API under zig.pm/api with two end points:

Feel free to use that for package managers or other cool stuff!

How does it work?

I run the package-collector once every 15 minutes. This tool then uses the APIs of GitHub, astrolabe.pm and aquila.red to collect and deduplicate packages (by their clone url).

For aquila.red and astrolabe.pm i assume that everything is a Zig package, for GitHub, i scrape the topics zig-package and zig-library.

Feel free to PR me improvements or new package sources to the repo, so we can make this the absolute package index for Zig where we can find all packages!

Spread the word!

Make sure everyone hears of this. Let's package zig-package the industry standard for finding zig packages on any code distribution site and index.

If you want to help me pay the VPS, you can either sponsor me on GitHub or drop me some money via PayPal to help me finance this server!

Oldest comments (4)

Collapse
 
javier profile image
Javier • Edited

How do I add non-git packages (eg zigqlite)? Hopefully fossil support will be merged to zigmod, but even without it, I have automatic tar and zip links.

Collapse
 
xq profile image
Felix "xq" Queißner

That's a pretty good question! Maybe i should replace the git property with a sources property where one can add several sources:

"sources": {
  { "format": "git", "https://…/foo.git" },
  { "format": "tar", "https://…/foo.tar.gz" },
  { "format": "zip", "https://…/foo.zip" },
},
Enter fullscreen mode Exit fullscreen mode
Collapse
 
javier profile image
Javier

but how? all of the sources mentioned in the article are git based. where can I submit links to my packages?

Thread Thread
 
xq profile image
Felix "xq" Queißner

Change the entries in github.com/ziglibs/repository, they are not using a git source. Well, right now they are, but submit a change that allows that :)