Quickstart

Build Zynx from source, run the first program, and verify the local compiler works.

Zynx currently builds from source. This path assumes a Unix-like shell on Linux or macOS with CMake, Ninja, Clang, LLVM/libclang development files, LLD, and Python 3 installed.

Install Build Tools

Choose the closest command for your host:

# macOS with Homebrew
brew install cmake ninja llvm python

# Debian / Ubuntu
sudo apt install cmake ninja-build clang llvm-dev libclang-dev lld python3

# Fedora
sudo dnf install cmake ninja-build clang llvm-devel clang-devel lld python3

# Arch Linux
sudo pacman -S cmake ninja clang llvm lld python

No Zynx output is expected from this step; package managers print their own progress and summary lines.

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

Build And Run

git clone https://github.com/zynx-lang/zynx.git
cd zynx
make
cat > main.zx <<'EOF'
import std.io;

fn main() {
    io.println("Hello, Zynx");
}
EOF
./zynx run main.zx

Expected output:

Hello, Zynx

Verify Tests

Run the default compiler and tooling checks:

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

Successful runs exit with status 0. Exact progress output varies by host and test selection.

Loopback networking tests are a separate host-capability tier:

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

Run that tier on a host that allows local loopback sockets. Successful loopback runs exit with status 0; exact progress output is not fixed.

If Imports Fail

When running directly from a source checkout, make builds the development standard library under build/lib/zynx. If import std.io is not found, pass the module path explicitly:

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

Expected output:

Hello, Zynx

Continue with Learn Zynx for a linear tour, or CLI Reference for command details.