Skip to content

Build from Source

Prerequisites

Tool Minimum Notes
CMake 3.16
C compiler C99 GCC or Clang — builds the entire core library
C++ compiler C++17 Optional — only for the ZMQ/stream component (vendored libzmq is C++); the core libdoppler is pure C99

Python extensions

make pyext additionally requires Python 3.9+ with development headers and NumPy.

Ubuntu / Debian

sudo apt-get install build-essential cmake pkg-config \
  python3-dev python3-numpy

Arch (incl. Manjaro, EndeavourOS, CachyOS)

sudo pacman -S --needed base-devel cmake python python-numpy

Fedora / RHEL (incl. Rocky, AlmaLinux)

sudo dnf install gcc gcc-c++ make cmake pkgconf-pkg-config \
  python3-devel python3-numpy

openSUSE (Leap / Tumbleweed)

sudo zypper install gcc gcc-c++ make cmake pkg-config \
  python3-devel python3-numpy

macOS

brew install cmake python numpy

Windows

doppler does not target Windows natively. Build and run under WSL2, a Linux VM, or a container, and follow the Ubuntu / Debian steps above.

Build

make
make pyext

Or directly with CMake:

cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel

Maximum performance

make blazing adds -march=native to enable all CPU extensions (AVX2, NEON, SVE, …) for the current machine. Binaries built this way are not portable to other machines.

CMake options

Option Default Description
BUILD_PYTHON OFF Build Python C extensions (make pyext enables this)
ENABLE_SIMD ON SIMD / fast-math flags (disable for strict portability)
Python3_EXECUTABLE auto Override Python interpreter (ensures correct ABI suffix)

Example — build Python extensions against a specific interpreter:

cmake -B build -S . \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_PYTHON=ON \
    -DPython3_EXECUTABLE="$(which python3)"
cmake --build build --parallel

Make targets

Target Description
make Configure + build (Release)
make pyext Build Python extensions into src/doppler/
make test Run CTest suite (requires make pyext first)
make python-test Run pytest
make test-all CTest + pytest + example smoke tests
make rust-test Build C library + run Rust FFI tests
make debug Clean + Debug build
make release Clean + Release build
make blazing Clean + Release + -march=native
make clean Remove build/ and compiled .so files
make help Show all targets and overrides