Skip to content

Installation

Yardl is a single executable file. The installation steps are:

  1. Head over to the latest release page.
  2. Download the right archive for your platform.
  3. Extract the archive and find the yardl executable. Copy it to a directory in your PATH environment variable.

You should now be able to run yardl --version.

C++ Dependencies

In order to compile the C++ code that yardl generates, you will need to have a C++17 (or more recent) compiler and the following dependencies installed:

  1. HDF5 with the C++ API, version 1.10.5 or later.
  2. xtensor, version 0.21.10 or later.
  3. Howard Hinnant's date library, version 3.0.0 or later.
  4. JSON for Modern C++, version: 3.11.1 or later.

Pixi

An easy way to get all dependencies and a complete C++ toolchain is to create an isolated environment with pixi. To set up a new project from scratch:

bash
pixi init my-project
cd my-project
pixi add cmake cxx-compiler hdf5 xtensor howardhinnant_date nlohmann_json
pixi shell

This installs a complete C++ toolchain alongside the libraries, fully isolated from your system. The cxx-compiler meta-package pulls in the appropriate compiler for your platform.

Conda

Alternatively, if using the Conda package manager, these dependencies can be installed with:

bash
conda install -c conda-forge cmake cxx-compiler hdf5 xtensor howardhinnant_date nlohmann_json

vcpkg

If using vcpkg, you can use a manifest file that looks like the one here.

Homebrew

On macOS, you can use Homebrew to install the dependencies:

bash
brew install hdf5 xtensor howard-hinnant-date

CMake

The yardl generate command emits a CMakeLists.txt that defines an object library and the necessary find_package() and target_link_libraries() calls. It has been tested to work on Linux with Clang and GCC, on macOS with Clang, and on Windows with MSVC with vcpkg.