Building the sources

simdzone supports a wide variety of platforms and architectures by design. The library performs well on any processor, but a modern processor supporting single instruction, multiple data (SIMD) is required for best performance.

Supported instruction sets.

  • AVX2

  • SSE4.2

Note

Support for additional SIMD instruction sets like Arm Neon, AVX-512, etc will be implemented, but is somewhat hindered by lack of available hardware. Help with implementing or even testing support for non-x86_64 architectures is greatly appreciated.

Automated builds are in place for Linux, macOS and Windows. Any operating system specific issues for those platforms are caught early, but simdzone strives to work on many operating systems.

Prerequisites

Note

simdzone started out as a replacement zone parser for NSD and is included in the NSD source packages and repository. For compatibility with the build system used by NSD, an autoconf configure script and a Makefile are included, but for standalone compilation, CMake is required.

simdzone is implemented in C and a C compiler supporting C99 is required to build the libary. e.g. GCC, Clang or Microsoft Visual Studio (MSVC). The project purposely has no runtime dependencies.

Make sure the following software is installed on your system:

  • A C99 compatible C compiler.

  • Git version control system.

  • CMake, version 3.10 or later, see :ref:build_options.

  • Optionally, cmocka when building with testing.

  • Optionally, Doxygen when building with documentation.

  • Optionally, Sphinx when building with documentation.

Note

Conan can be used to manage build dependencies.

Install dependencies.

dnf install git cmake gcc
apt install git cmake gcc

Building

Clone simdzone from GitHub:

git clone https://github.com/NLnetLabs/simdzone.git
cd simdzone

Build the library using the operating system specific instructions below. The instructions are tailored to users of the library. Developers may want to choose a different build type, e.g. RelWithDebInfo or Debug, and skip installation.

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<install-location> ..
cmake --build . --parallel
cmake --install .

Build options

-DBUILD_TESTING=ON

Build the testing tree.

-DBUILD_DOCUMENTATION=ON

Build documentation.