Sh4d1/registry

The official registry of Zig packages and applications for Zig Index.

โ˜… 0Forks 0GitHub โ†—Compare

README

Zig Index Registry

The official registry of Zig packages and applications for Zig Index.

๐ŸŒŸ Overview

Zig Index is a community-driven registry for discovering and sharing Zig packages, libraries, and applications. It provides:

  • ๐Ÿ“ฆ Package Discovery: Browse and search through curated Zig packages
  • ๐Ÿš€ Application Showcase: Find tools and software built with Zig
  • ๐Ÿ“Š Live Statistics: Real-time GitHub stats (stars, forks, issues)
  • ๐Ÿ“– README Display: View project documentation directly
  • ๐Ÿ”ง Installation Commands: Copy-to-clipboard zig fetch commands
  • ๐Ÿ‘ค Developer Profiles: View contributors and their Zig projects
  • ๐Ÿ” Advanced Search: Filter by category, license, and more

๐Ÿ“ Structure

repositories/
โ”œโ”€โ”€ applications/           # Applications built with Zig
โ”‚   โ”œโ”€โ”€ bun.json           # Bun JavaScript runtime
โ”‚   โ”œโ”€โ”€ tigerbeetle.json   # TigerBeetle database
โ”‚   โ””โ”€โ”€ zig-compiler.json  # Zig compiler itself
โ””โ”€โ”€ packages/              # Zig libraries and packages
    โ”œโ”€โ”€ capy.json          # Cross-platform GUI library
    โ”œโ”€โ”€ logly.json         # Logging library
    โ”œโ”€โ”€ mach.json          # Game engine & graphics toolkit
    โ”œโ”€โ”€ zig-std.json       # Standard library docs
    โ””โ”€โ”€ zls.json           # Zig Language Server

โž• Adding Your Project

Step 1: Fork this repository

Fork the Zig Index registry repository on GitHub.

Step 2: Create a JSON file

For Packages (libraries/modules)

Create a file in src/registry/repositories/packages/your-package.json:

{
  "name": "Your Package Name",
  "owner": "github-username",
  "repo": "repository-name",
  "description": "A brief description of your package (max 200 chars)",
  "homepage": "https://your-docs-site.com",
  "license": "MIT",
  "category": "networking"
}

For Applications (tools/software)

Create a file in src/registry/repositories/applications/your-app.json:

{
  "name": "Your Application Name",
  "owner": "github-username",
  "repo": "repository-name",
  "description": "A brief description of your application",
  "homepage": "https://your-app-site.com",
  "license": "MIT",
  "category": "development-tools",
  "download_url": "https://example.com/your-app-installer.exe"
}

Step 3: Submit a Pull Request

Submit a PR with your changes. We'll review and merge it!

๐Ÿ“‹ JSON Schema

Field Type Required Description
name string โœ… Display name of the project
owner string โœ… GitHub username or organization
repo string โœ… GitHub repository name
description string โœ… Brief description (max 200 chars)
homepage string โŒ Project website or documentation URL
license string โŒ SPDX license identifier (e.g., "MIT", "Apache-2.0")
category string โŒ Category for filtering (see categories below)
download_url string โŒ Direct download URL for binary releases

Required Fields

  • name - The display name shown on the website
  • owner - Your GitHub username or organization name
  • repo - The exact repository name on GitHub
  • description - A brief description of your project (keep it under 200 characters)

Optional Fields

  • homepage - Link to your documentation or project website
  • license - Use SPDX identifiers (MIT, Apache-2.0, GPL-3.0, etc.)
  • category - Helps users filter and discover your project
  • download_url - Direct download link for pre-built binaries

๐Ÿ”ง Installation

For Packages

Users can install packages directly using zig fetch:

# Using .tar.gz (recommended)
zig fetch --save https://github.com/{owner}/{repo}/archive/refs/tags/{version}.tar.gz

# Using .zip
zig fetch --save https://github.com/{owner}/{repo}/archive/refs/tags/{version}.zip

For repositories without releases, the main branch is used:

# Main branch (latest commit)
zig fetch --save https://github.com/{owner}/{repo}/archive/refs/heads/main.tar.gz

The website automatically generates these commands with copy-to-clipboard functionality!

build.zig.zon Integration

After running zig fetch --save, add the dependency to your build.zig:

const std = @import("std");

pub fn build(b: *std.Build) void {
    const target = b.standardTargetOptions(.{});
    const optimize = b.standardOptimizeOption(.{});

    // Add dependency
    const dep = b.dependency("package-name", .{
        .target = target,
        .optimize = optimize,
    });

    const exe = b.addExecutable(.{
        .name = "my-app",
        .root_source_file = b.path("src/main.zig"),
        .target = target,
        .optimize = optimize,
    });

    // Import module from dependency
    exe.root_module.addImport("package-name", dep.module("package-name"));
    
    b.installArtifact(exe);
}

๐ŸŒ Website Features

Pages

Page URL Description
Home / Overview with stats and featured projects
Packages /packages Browse all Zig packages
Applications /applications Browse all Zig applications
Search /search Advanced search with filters
Repository /repo?owner=xxx&name=yyy Detailed project view
User Profile /u?username=xxx Developer profile & projects
How to Add /how-to-add Submission guide

๐Ÿ“œ Guidelines

Do Submit

  • โœ… Open source Zig projects on GitHub
  • โœ… Projects with build.zig or build.zig.zon
  • โœ… Well-documented projects with READMEs
  • โœ… Active projects (updated within the last year)

Don't Submit

  • โŒ Closed source projects
  • โŒ Non-Zig projects
  • โŒ Abandoned/archived repositories
  • โŒ Forks without significant changes
  • โŒ Tutorial/example code (unless it's a library)

๐Ÿ› ๏ธ Development

Prerequisites

  • Node.js 18+
  • npm or pnpm

Local Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

Tech Stack

๐Ÿ“„ License

This registry is open source under the MIT License.

๐Ÿ”— Links

๐Ÿค Contributing

We welcome contributions! Here's how you can help:

  1. Add Projects: Submit PRs to add Zig packages/applications
  2. Report Issues: Found a bug? Open an issue
  3. Improve Code: PRs for bug fixes and features welcome
  4. Spread the Word: Share Zig Index with the community!

Made with โค๏ธ by the Zig Community

Contributors

muhammad-fiazSh4d1

Issues