When cloning the repo, initialize the submodules you need. For a standard build:
git submodule update --init deps/dd-trace-cpp deps/nginx-datadogThe deps/inject-browser-sdk submodule is a private repo and is only required when building with -DHTTPD_DATADOG_ENABLE_RUM=ON. If you have access, use --recursive instead to pull it as well.
- Follow the pattern of what you already see in the code.
- Follow the coding style.
| Tool | Version | Notes |
|---|---|---|
clang or gcc |
14+ or 11.4+ | |
python |
3.0+ | |
cmake |
3.12+ |
Once you got a valid Python installation, install all the dependencies with:
pip install -r requirements.txtIn order to build the module you have to configure httpd with the scripts/setup-httpd.py script. Check what is the latest available version on Apache website, then:
export HTTPD_VERSION=2.4.66
python scripts/setup-httpd.py $HTTPD_VERSION
cd httpd
./configure --with-included-apr --prefix=$(pwd)/httpd-build --enable-mpms-shared="all"The RUM variant requires Rust to build:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shRelaunch your terminal (or do source ~/.cargo/env).
CMake is our build system. If you are not familiar with CMake, read the tutorial.
Configure and compile all targets in release:
cmake -B build -DCMAKE_BUILD_TYPE=Release -DHTTPD_SRC_DIR=httpd .
cmake --build build -jFor now there are only integration tests.
Run with -X.