🚀️ Always up-to-date Ninja binaries for Linux, Windows, macOS, and FreeBSD - just download and use it.
⭐ If you find this repository useful, please consider giving it a star.
The Linux binaries are compiled with the GCC Toolchain targeting older glibc versions and musl, ensuring compatibility across a wide range of Linux distributions. The Windows binaries are compiled with MSVC and statically linked against the MSVC runtime, so the Visual C++ Redistributable is not required to run them. The macOS binaries are compiled with Clang for Apple Silicon (aarch64), targeting macOS 11.0 (Big Sur) and later. The FreeBSD binaries are compiled with Clang targeting FreeBSD 13.5 and later. GitHub CI workflows are used to automate the build process: pipelines run daily, but new builds are triggered only when a new Ninja release is available.
- Outdated distro packages. Many Linux distributions ship outdated Ninja versions through their package managers, sometimes years behind upstream.
- Limited official releases. The official Ninja releases only ship a single binary per platform. This repository builds and publishes Ninja for a much wider range of platforms and architectures, so you don't have to build it yourself.
- Always up to date. GitHub CI workflows rebuild and publish Ninja automatically whenever a new version is released upstream.
- No extra dependencies. Windows binaries statically link the MSVC runtime and musl-based Linux binaries are fully static, so there's no separate runtime to install. The remaining builds only depend on base system libraries that are already present on the OS.
- GNU targets are dynamically linked with an older glibc version; musl targets are fully statically linked. For details, see the GCC Toolchain.
- Statically linked with libstdc++ and libgcc.
- Statically linked with the MSVC runtime (
/MT).
- Built only for Apple Silicon (aarch64), targeting macOS 11.0 (Big Sur) and later.
- Built only for x86_64, targeting FreeBSD 13.5 and later.
If you prefer not to build the Ninja yourself, a precompiled Ninja for each supported architecture can be downloaded from the releases page.
Replace <target> with one of: x86_64-linux-gnu, x86_64-linux-musl, aarch64-linux-gnu, aarch64-linux-musl,
arm-linux-gnueabi, riscv64-linux-gnu.
The command installs Ninja to /usr/local/bin. Replace it with a different path if needed.
curl -sSL https://github.com/prepkg/ninja/releases/latest/download/ninja-<target>.tar.gz | sudo tar xz -C /usr/local/binFor example:
curl -sSL https://github.com/prepkg/ninja/releases/latest/download/ninja-x86_64-linux-gnu.tar.gz | sudo tar xz -C /usr/local/binThe command installs Ninja in the current directory. Replace .\ with a different path if needed.
- x86_64
curl -sSL https://github.com/prepkg/ninja/releases/latest/download/ninja-x86_64-windows-msvc.tar.gz | tar xz -C .\- aarch64
curl -sSL https://github.com/prepkg/ninja/releases/latest/download/ninja-aarch64-windows-msvc.tar.gz | tar xz -C .\The command installs Ninja to /usr/local/bin. Replace it with a different path if needed.
curl -sSL https://github.com/prepkg/ninja/releases/latest/download/ninja-aarch64-macos-clang.tar.gz | sudo tar xz -C /usr/local/binThe command installs Ninja to /usr/local/bin. Replace it with a different path if needed.
curl -sSL https://github.com/prepkg/ninja/releases/latest/download/ninja-x86_64-freebsd-clang.tar.gz | sudo tar xz -C /usr/local/bin- Git
- Docker
- Clone the repository:
git clone https://github.com/prepkg/ninja.git && cd ninja- Build the Docker image:
./setup.sh build-image- Build the application:
./setup.sh build-appAfter compilation, the tar.gz for each architecture will be available in the build directory.
- Visual Studio with the "Desktop development with C++" workload
- Git
- CMake
- Ninja
- re2c
- Clone the repository:
git clone https://github.com/prepkg/ninja.git && cd ninja- Build the application, passing the path to the Visual Studio
VC\Auxiliary\Builddirectory:
powershell -ExecutionPolicy Bypass -File .\scripts\windows\compile.ps1 "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Auxiliary\Build"After compilation, the tar.gz for each architecture will be available in the build directory.
- Xcode Command Line Tools
- Git
- CMake
- Ninja
- re2c
- Clone the repository:
git clone https://github.com/prepkg/ninja.git && cd ninja- Build the application:
./scripts/macos/compile.shAfter compilation, the tar.gz will be available in the build directory.
- curl
- Git
- CMake
- Ninja
- re2c
- Clone the repository:
git clone https://github.com/prepkg/ninja.git && cd ninja- Build the application:
./scripts/freebsd/compile.shAfter compilation, the tar.gz will be available in the build directory.