Skip to content

Install Zap

Install the latest Zap toolchain with zapup:

Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://zaplang.xyz/install.sh | sh

Check the compiler installation:

Terminal window
zapc --version
zapc --print-stdlib-path

The second command is useful when configuring an editor or diagnosing a custom installation.

Use Thor to create, build, and run Zap applications. Install it after zapc:

Terminal window
git clone https://github.com/thezaplang/thor
cd thor
./build.sh
sudo cp build/thor /usr/local/bin/thor
thor --version

Thor 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.

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:

Terminal window
git clone https://github.com/thezaplang/zap.git
cd zap
./build.sh

The 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.

Run both test suites before changing the compiler:

Terminal window
meson test -C build --print-errorlogs
./run_tests.sh

Continue with Your first program.