Skip to content

Building

tazz edited this page Aug 29, 2026 · 1 revision

Building

Building From Source

You will need the following to build this from source:

The following libraries:

Optional requirements marked with: *


1. Clone the repository

git clone https://github.com/arcadia-de/hypha.git
cd hypha/

2. Set up the build using Meson

meson setup build

3. Build the Engine using Ninja

ninja -C build

4. Optionally, install the Engine

ninja -C build install

5. Build the CLI using Go

The CLI's Go sources require a .pc file generated by Meson.

IF the Engine is installed:

CGO_ENABLED=1 \
go build \
    -ldflags="-X main.Version=1.0.0 -linkmode=external -s -w -extldflags=-Wl,--gc-sections" \
    -o hypha \
    cmd/hypha/main.go

IF the Engine is not installed:

CGO_ENABLED=1 \
PKG_CONFIG_PATH="$(pwd)/build/meson-uninstalled:$PKG_CONFIG_PATH" \
go build \
    -ldflags="-X main.Version=1.0.0 -linkmode=external -s -w -extldflags=-Wl,--gc-sections" \
    -o hypha \
    cmd/hypha/main.go

Rebuilding

You can rebuild by doing:

meson setup build --reconfigure
ninja -C build

Then rebuild the CLI using Go as discussed in Step 5.

Using Task

You can also use task to build.

You will need:

task # defaults to: task build

Building Using Container

Building using the container is more portable, but requires Docker

You will need the following:

docker run \
    --rm \
    -it \
    -v "$(pwd):/workspace" \
    -w /workspace \
    ghcr.io/arcadia-de/hypha-build-env:latest

This will drop you in the container into the /workspace directory.

Task is not provided in the container, however the required tools and libraries are pre-installed.

You can build using the following:

# set up build using meson
meson setup build

# build engine using ninja
ninja -C build

# build cli using go
CGO_ENABLED=1 \
PKG_CONFIG_PATH="$(pwd)/build/meson-uninstalled:$PKG_CONFIG_PATH" \
go build \
    -ldflags="-X main.Version=1.0.0 -linkmode=external -s -w -extldflags=-Wl,--gc-sections" \
    -o hypha \
    cmd/hypha/main.go

Clone this wiki locally