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.

Conda

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

bash
conda install -c conda-forge hdf5 xtensor howardhinnant_date nlohmann-json
conda install -c conda-forge hdf5 xtensor howardhinnant_date nlohmann-json

Alternatively, you can create a new conda environment with all dependencies and compilers using an environment.yml like the one in this repo.

bash
wget https://raw.githubusercontent.com/microsoft/yardl/main/environment.yml
conda env create -n yardl -f environment.yml
conda activate yardl
wget https://raw.githubusercontent.com/microsoft/yardl/main/environment.yml
conda env create -n yardl -f environment.yml
conda activate yardl

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
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.