Installation

Install required tools, build from source, run checks, install, and locate SDKs.

Zynx currently builds from source. This page is the short install path for the current development compiler. The detailed build and SDK references live in Building Zynx and Zynx SDK.

Required Tools

  • CMake 3.20 or newer
  • Ninja
  • Clang or another C23-capable C compiler
  • LLVM development package with CMake package files
  • libclang development package for bindgen support
  • Python 3 for tests and tooling

Linux distributions usually package these as versioned LLVM, Clang, libclang, and LLD development packages. The default build uses system LLVM. Use Building Zynx for bundled static LLVM builds when system packages are not suitable.

Typical package names:

PlatformPackages
macOS with Homebrewcmake, ninja, llvm
Debian / Ubuntucmake, ninja-build, clang, llvm-dev, libclang-dev, lld, python3
Fedoracmake, ninja-build, clang, llvm-devel, clang-devel, lld, python3
Arch Linuxcmake, ninja, clang, llvm, lld, python

Example install commands:

brew install cmake ninja llvm python
sudo apt install cmake ninja-build clang llvm-dev libclang-dev lld python3
sudo dnf install cmake ninja-build clang llvm-devel clang-devel lld python3
sudo pacman -S cmake ninja clang llvm lld python

Package names and default LLVM versions vary by distribution. When the system LLVM package is too old or missing CMake package files, use make static or set LLVM_CONFIG, LLVM_DIR, and Clang_DIR explicitly.

The normal build supports LLVM 18 and newer. The bundled static build path pins LLVM 22.1.5.

Platform Status

HostStatus
LinuxPrimary host for default and SDK build/test work.
macOSSupported development host with Homebrew or explicit LLVM paths.
WindowsNot a documented host target for 0.0.0-dev; use a Unix-like environment or Linux/macOS host.

SDK target support is separate from host support. See Zynx SDK for Linux musl/LLVM-libc and Darwin overlay target triples.

Build From Source

git clone https://github.com/zynx-lang/zynx.git
cd zynx
make

This builds the compiler as ./zynx, the runtime archive, and the standard library archive/module headers under build/.

Run The First Program

If the goal is only to try the language, stop after make and follow Hello World:

./zynx run main.zx
# Hello, Zynx

Installed SDKs, cross targets, package caches, and make install are not needed for the first local program.

Useful development checks:

make test
python3 tests/run.py
python3 tests/tooling/run.py
python3 tests/tooling/test_docs_examples.py

The required host-capability loopback tier is separate from the default suite:

python3 tests/run.py --require-capability loopback --only-requiring-capability loopback

Run it on a host where local loopback sockets are available.

Install From Source

make install PREFIX=/usr/local

PREFIX defaults to /usr/local. Installed SDK roots are discovered at <prefix>/share/zynx/sdk when zynx is launched from the installed bin directory.

Uninstall with:

make uninstall PREFIX=/usr/local

SDKs

The in-tree SDK root is build/sdk. Build the default SDK target set with:

make sdk

Build a single target or explicit target set with:

make sdk TARGET=x86_64-linux-musl
make sdk SDK_TARGETS="x86_64-linux-musl aarch64-linux-musl"

SDK archives are written under build/sdk/archives/ and can be installed with:

./zynx sdk install build/sdk/archives/zynx-sdk-<host>-to-<target>.tar.gz

SDK discovery order is:

  1. --sdk <path>
  2. ZYNX_SDK
  3. in-tree build/sdk
  4. installed <prefix>/share/zynx/sdk
  5. ~/.local/share/zynx/sdk

Use these commands to inspect SDK state:

./zynx sdk list
./zynx sdk path --target x86_64-linux-musl
./zynx sdk doctor --target x86_64-linux-musl

Packages

Package distribution supports local projects, exact git dependencies, lockfile reuse, package-cache restoration, and static .zxm bundle metadata validation. Package registries, semver ranges, signing, publishing workflows, mirrors, and first-class vendor archives are excluded from the current 0.x contract.

The default package cache is $ZYNX_HOME/packages, or ~/.local/share/zynx/packages when ZYNX_HOME is not set.

Create and run a new project directory with:

./zynx new hello
cd hello
./zynx run

Or initialize the current directory and check package state:

./zynx init --name my_project
./zynx package check
./zynx run

See Packages and Distribution for the full contract and manifest examples.

Troubleshooting

If CMake cannot find LLVM or Clang, check the package-provided CMake paths and rerun with explicit locations:

make LLVM_CONFIG=/opt/homebrew/opt/llvm/bin/llvm-config
make LLVM_DIR=/path/to/lib/cmake/llvm Clang_DIR=/path/to/lib/cmake/clang

If import std.io fails from a source checkout, make sure make completed and run with the development module path:

./zynx run --module-path=build/lib/zynx main.zx

If loopback networking tests fail in a sandbox, rerun the default suite first and run the loopback capability tier on a host that allows local sockets.

Platform Limitations

  • The default test tier is hermetic and may skip capability-gated host tests.
  • Current development checks also need a loopback-capable host run before release-facing confidence claims.
  • network-external tests are not part of default CI.
  • Real SDK packaging with make sdk can require target toolchains and platform inputs that are not present in minimal sandboxes.
  • Linux SDK targets are static-only in the current SDK contract.
  • Darwin targets link against platform libSystem; fully static Darwin executables are not supported.
  • Dynamic require(...) and runtime dynamic module loading are excluded from normal source.