The Zap toolchain installer.
zapup installs and manages Zap toolchain versions.
Install the latest toolchain from source:
zapup install --srcInstall a specific zap-lsp revision:
zapup install --src <commit>Source builds use the compiler revision pinned by zap-lsp, ensuring that
zapc, zap-lsp, runtime.o, core/, and std/ come from the same
toolchain version.
Installed source toolchains are stored under:
versions/lsp-<commit>/
Source installation requires:
- Git
- Bash
- Meson
- Ninja
- C++17 compiler
- LLVM 21+
- OpenSSL development files
Node.js and npm are only required when building the VS Code extension.
Binary installations are downloaded from Zap releases.
Release archives contain the complete toolchain, including:
zapc
zap-lsp
runtime.o
core/
std/
Build zapup and run its tests with:
mkdir -p build
zapc src/main.zp -o build/zapup
zapc tests/release_metadata_test.zp -o build/release_metadata_test
./build/release_metadata_test
python3 tests/source_install_test.py /absolute/path/to/zapcThe tests cover source installations, pinned revisions, submodule failures, and release metadata handling.
A failed source installation may leave an incomplete checkout behind.
Before retrying, remove either:
.zapup-source-tmp
or the incomplete:
versions/lsp-<commit>