https://github.com/francescobianco/zub.zig
Zig-native installer for Zig binaries published in the ZUB registry.
https://github.com/francescobianco/zub.zig
linux macos package-index package-manager ubuntu version-manager windows zig zig-cli zig-package ziglang
Last synced: about 13 hours ago
JSON representation
Zig-native installer for Zig binaries published in the ZUB registry.
- Host: GitHub
- URL: https://github.com/francescobianco/zub.zig
- Owner: francescobianco
- License: mit
- Created: 2026-04-10T20:14:56.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-16T10:35:22.000Z (2 months ago)
- Last Synced: 2026-05-16T16:29:05.921Z (about 1 month ago)
- Topics: linux, macos, package-index, package-manager, ubuntu, version-manager, windows, zig, zig-cli, zig-package, ziglang
- Language: Zig
- Homepage: https://yafb.net/zub.zig
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zub
`zub` is a Zig-native installer for Zig binaries published in the ZUB registry.
Its job is simple:
- install `zvm` by default
- detect the Zig version required by a package
- provision that Zig version automatically
- build the package
- place the resulting executable in `$HOME/.local/bin`
The registry source is:
`https://zub.javanile.org/packages.json`
## Install
The intended bootstrap flow is:
```bash
curl -fsSL https://yafb.net/zub.zig/install.sh | bash
```
The published installer is stored at `docs/install.sh` in this repository.
The installer:
- installs `zvm` if it is missing
- installs a bootstrap Zig version
- builds `zub`
- installs `zub` into `$HOME/.local/bin`
## Usage
Install a package from the registry:
```bash
zub install pbm
```
Search packages in the registry:
```bash
zub search http
```
What `zub` does under the hood:
1. downloads the package index from `https://zub.javanile.org/packages.json`
2. resolves the package repository from the registry entry
3. clones or updates the source in the local cache
4. reads `build.zig.zon` to detect `minimum_zig_version` when available
5. uses `zvm` to install that Zig version
6. runs `zig build`
7. copies the produced executable into `$HOME/.local/bin`
## Paths
- binary install dir: `$HOME/.local/bin`
- source cache: `$HOME/.cache/zub/src`
- temp build cache: `$HOME/.cache/zub/tmp`
## Notes
- `zub` currently assumes registry package URLs follow the GitHub pattern `/packages///`.
- if a package does not expose `minimum_zig_version`, `zub` falls back to `master`
- build output resolution prefers `zig-out/bin/` and otherwise picks a single executable found in `zig-out/bin`
## Development
Build locally:
```bash
zig build
```
Run:
```bash
./zig-out/bin/zub
```