Install Zap
Install the latest Zap toolchain with zapup:
curl --proto '=https' --tlsv1.2 -sSf https://zaplang.xyz/install.sh | shCheck the compiler installation:
zapc --versionzapc --print-stdlib-pathThe second command is useful when configuring an editor or diagnosing a custom installation.
Install Thor
Section titled “Install Thor”Use Thor to create, build, and run Zap applications. Install it after zapc:
git clone https://github.com/thezaplang/thorcd thor./build.shsudo cp build/thor /usr/local/bin/thorthor --versionThor invokes the installed zapc; it does not keep a second copy of the Zap
standard library. See Thor build tool for project
configuration and dependencies.
Build from source
Section titled “Build from source”A source build requires:
- Clang 15+ or GCC 12.1+
- LLVM 21 development libraries
- Meson and Ninja
- OpenSSL development libraries
- Python 3
Clone and build the repository:
git clone https://github.com/thezaplang/zap.gitcd zap./build.shThe compiler is written to build/zapc. Add that directory to your PATH for
daily use, then install Thor with the instructions above. zapc remains useful
for editor configuration and low-level compiler diagnostics; Thor is the
normal application workflow.
Verify a development build
Section titled “Verify a development build”Run both test suites before changing the compiler:
meson test -C build --print-errorlogs./run_tests.shContinue with Your first program.