Installing Zynx
This guide is the shortest path from a checkout to a working local zynx binary. It covers the normal build, focused test commands, optional install, and pointers to the deeper build, SDK, and package references.
Requirements
- 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
The default build uses system LLVM. If your system packages are not suitable, use the bundled static build path in the Build Reference.
Quick Path
From the repository root:
make
make testThis creates ./zynx and verifies the default hermetic test tier. Install only when you want zynx and its source SDK roots under a prefix:
make install PREFIX=/usr/localUse ./zynx directly from the checkout for local development.
Build
makeThe default build configures build/cmake with Ninja, builds the compiler as ./zynx, and writes the runtime archive under build/. The standard library is used from source; the build does not produce a precompiled libzynx.a.
Test
make testFor focused validation, run a single test:
python3 tests/run.py <test>The default suite is hermetic and may skip host-capability tests. Run the loopback tier explicitly when validating networking behavior:
python3 tests/run.py --require-capability loopback --only-requiring-capability loopbackRun it on a host where local loopback sockets are available. See the Build Reference for the full test capability model.
Install
make install PREFIX=/usr/localPREFIX defaults to /usr/local. Installed SDK roots are discovered at <prefix>/share/zynx/sdk when zynx is launched from the installed bin directory. Use a writable prefix, such as /tmp/zynx-install, when installing without elevated privileges.
Uninstall with:
make uninstall PREFIX=/usr/localSDKs
Most native builds do not need an SDK. Build SDK archives when you need the opt-in cross toolchain for static Linux targets or Darwin overlays.
Build the default SDK target set with:
make sdkDefault make sdk packages Linux SDK targets and must run on a Linux host. Use Linux CI or a Linux container when validating SDK packaging.
Build one target or an explicit target set with:
make sdk TARGET=x86_64-linux-musl
make sdk SDK_TARGETS="x86_64-linux-musl aarch64-linux-musl"Install a local SDK archive with:
./zynx sdk install build/sdk/archives/zynx-sdk-<target>.tar.gzInspect SDK state with:
./zynx sdk list
./zynx sdk path --target x86_64-linux-musl
./zynx sdk doctor --target x86_64-linux-muslSee the SDK Reference for target lists, discovery order, Darwin overlays, and packaging details.
Packages
Start a local package in an empty directory:
./zynx init --name my_project
./zynx package check
./zynx runThe last command remains sufficient for a target with no @host requirements. The accepted RFC 0068–0070 target uses one explicit deployment document when a root declares host loans:
./zynx run --grants dev.zynx-launch -- arg1 arg2
./zynx launch --grants prod.zynx-launch build/my_project -- arg1 arg2These launch-grant commands are not implemented yet. There is no default-file discovery: --grants selects the complete document explicitly, before --, and the document path never becomes a program argument. Every grant must carry its complete closed kind-specific policy; omission is invalid and an explicit empty policy is deny-all. See Host Capability Requirements.
The current package workflow supports local source packages, exact git dependencies, lockfile reuse, package-cache restoration, and static .zxm bundle metadata validation. Registries, semver ranges, signing, publishing workflows, mirrors, and managed vendor archives are not implemented.
See the Package Reference for the package distribution contract and manifest examples.
Common Options
| Option | Use |
|---|---|
PREFIX=/path | Install or uninstall under a non-default prefix. |
BUILDTYPE=release | Build a release compiler instead of the default debug compiler. |
TARGET=<triple> | Build one SDK target with make sdk TARGET=<triple>. |
SDK_TARGETS="..." | Build an explicit SDK target set. |
For the complete list of build variables, use the Build Reference.
Platform Limitations
- The default test tier is hermetic and may skip capability-gated host tests.
network-externaltests are not part of default CI.- Default SDK packaging is Linux-host-only in the current SDK setup.
- Linux SDK targets are static-only and avoid host
/usr/lib, GCC runtime libraries, and glibc-style CRT discovery. - Darwin targets link against platform
libSystem; fully static Darwin executables are not supported. - Dynamic
require(...)and runtime dynamic module loading are not part of the normal source language.
Project Status
The current standard-library surface is listed in the Standard Library. A compact runnable language tour is in Zynx By Example, and the project snapshot is summarized in Status.