|

Software Ports and Package manager for the Zygaena operating system.

Clone
hg clone ssh://hg@leafscale.isurus.dev:2222/zygaena/coral hg clone https://leafscale.isurus.dev/zygaena/coral
Branches
default
Tags
v0.4.2 v0.4.3 v0.4.5
Bookmarks
@
b8a253d99df4 chore: bump version to 0.4.5
Chris Tusa <chris.tusa@leafscale.com> 8 days ago

Coral Package Manager

Coral is the package manager for Zygaena, written in Reef.

Building

Prerequisites

  • Reef compiler (reefc) version 0.1.6+
  • On illumos: source the development environment first

Quick Start

# On illumos - source the environment
source /opt/zygaena-env.sh

# Build coral
cd ~/repos/zygaena/coral
reefc build -l socket -l nsl

# The binary is created at build/coral
./build/coral --help

Build Options

# Basic build (Linux/macOS)
reefc build

# illumos/Solaris (requires socket libraries)
reefc build -l socket -l nsl

# Type-check only (no compilation)
reefc build --check

# Verbose output
reefc build -v

# Keep generated C code for debugging
reefc build --keep-c

Installation

After building, install to your PATH:

# Option 1: Copy to /usr/local/bin (requires root)
sudo cp build/coral /usr/local/bin/

# Option 2: Copy to user bin
mkdir -p ~/bin
cp build/coral ~/bin/
export PATH="$HOME/bin:$PATH"

Usage

coral --help              # Show help
coral build <port>        # Build a package from port
coral install <pkg>       # Install package(s)
coral remove <pkg>        # Remove package(s)
coral upgrade [pkg]       # Upgrade package(s)
coral info <pkg>          # Show package info
coral list                # List installed packages
coral files <pkg>         # List files owned by package
coral owner <file>        # Find which package owns a file
coral search <term>       # Search for packages
coral depends <pkg>       # Show dependency tree
coral sync                # Update ports tree
coral outdated            # Show outdated packages
coral db status           # Show database status
coral clean status        # Show build artifact status
coral ports new cat/name  # Scaffold a new port
coral ports cache status  # Show ports index status

Project Structure

coral/
├── reef.toml             # Project manifest
├── src/
│   ├── main.reef         # Entry point, CLI dispatch
│   ├── types.reef        # Shared type definitions
│   ├── commands/         # Command implementations
│   │   ├── build.reef
│   │   ├── install.reef
│   │   ├── remove.reef
│   │   └── ...
│   ├── core/             # Core functionality
│   │   ├── port.reef     # Port file parsing
│   │   ├── portindex.reef # Ports index (MsgPack cache)
│   │   ├── package.reef  # Package operations
│   │   ├── database.reef # Package database
│   │   ├── resolver.reef # Dependency resolution
│   │   └── ...
│   └── util/             # Utilities
│       ├── http.reef     # HTTP downloads
│       ├── archive.reef  # Archive handling
│       └── ...
├── test/                 # Tests
├── build/                # Build output (generated)
└── docs/                 # Documentation

Configuration

Coral uses TOML for configuration. See docs/ for details on:

  • Port file format (package.toml)
  • Repository configuration
  • Build scripts (build.reef)

License

BSD-2-Clause

Languages
Reef 74%
Markdown 20%
CSV 3%
Shell 1%
TOML 1%
Groff 1%
YAML 0%
Activity
20 changesets
Updated 7 days ago