Installation
Homebrew
Section titled “Homebrew”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:
brew install ada-urlBuild from source
Section titled “Build from source”Requirements
Section titled “Requirements”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.
Compiling
Section titled “Compiling”Run the following commands to compile and build Ada locally.
-
Prepare build
The following command prepares the build.
Terminal window cmake -B build -
Build
Run the following command to build Ada on your system.
Terminal window cmake --build build -
Run tests
Run the following
ctestcommand to validate your build.Terminal window ctest --output-on-failure --test-dir build
Build options
Section titled “Build options”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:
cmake -B build -DADA_TESTING=ON && cmake --build buildctest --output-on-failure --test-dir buildWindows
Section titled “Windows”Windows users need additional flags to specify the build configuration, e.g. --config Release.
Docker
Section titled “Docker”The project can also be built via docker using default docker file of repository with following commands.
-
Build
Build and prepare the docker image
Terminal window docker build -t ada-builder . -
Run
Run the tests
Terminal window docker run --rm -it -v ${PWD}:/repo ada-builder
Amalgamation
Section titled “Amalgamation”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.
./singleheader/amalgamate.py