Prerequisites
All platforms
- Bazelisk (recommended) - automatically downloads and uses the correct Bazel version
- Or Bazel installed manually
Linux
You need clang/LLVM toolchain version 19 or higher:If clang is installed as
clang-<version>, create a symlink named clang in your PATH, or use --action_env=CC=clang-<version> on bazel command lines.macOS
- Xcode 16.3 (available on macOS 15 and higher)
- Homebrew’s
tcl-tkpackage:
Building with just the Xcode Command Line Tools is not actively tested, but should work.
Windows
Install dependencies
Install App Installer from the Microsoft Store for the This installs bazelisk, LLVM, and other required dependencies.
winget package manager.Run from an administrator prompt:Building workerd
Debug build
Build workerd in debug mode:Release build
For an optimized release build:High-performance build
For the best performance with thin LTO (Link Time Optimization):This requires a fairly recent clang installation.
Using Just commands
The project includes ajustfile with convenient shortcuts. Install Just:
Troubleshooting
Dependency installation issues
If you install dependencies after running a build, you need to resync cached toolchains:Visual Studio Code
You can also build from within Visual Studio Code. See the VSCode guide for setup instructions.Next steps
Testing
Learn how to run tests
Debugging
Set up debugging tools