Skip to content

Installation

Ada is available through Homebrew. Homebrew is kept up to date with the recent releases of Ada.

Run the following command to install Ada to your macOS computer:

Terminal window
brew install ada-url

The project is self-contained and has no dependency. A recent C++ compiler supporting C++20. We test GCC 12 or better, LLVM 14 or better and Microsoft Visual Studio 2022.

Run the following commands to compile and build Ada locally.

  1. Prepare build

    The following command prepares the build.

    Terminal window
    cmake -B build
  2. Build

    Run the following command to build Ada on your system.

    Terminal window
    cmake --build build
  3. Run tests

    Run the following ctest command to validate your build.

    Terminal window
    ctest --output-on-failure --test-dir build

Ada provides the following CMake options to customize the build:

  • ADA_TESTING: Enable tests (requires git). Default: OFF.
  • ADA_USE_SIMDUTF: Enable SIMD-accelerated Unicode processing via simdutf. Default: OFF.

Example with tests enabled:

Terminal window
cmake -B build -DADA_TESTING=ON && cmake --build build
ctest --output-on-failure --test-dir build

Windows users need additional flags to specify the build configuration, e.g. --config Release.

The project can also be built via docker using default docker file of repository with following commands.

  1. Build

    Build and prepare the docker image

    Terminal window
    docker build -t ada-builder .
  2. Run

    Run the tests

    Terminal window
    docker run --rm -it -v ${PWD}:/repo ada-builder

You may amalgamate all source files into only two files (ada.h and ada.cpp) by executing the Python 3 script singleheader/amalgamate.py. By default, the files are created in the singleheader directory.

Terminal window
./singleheader/amalgamate.py