Installation
Yardl is a single executable file. The installation steps are:
- Head over to the latest release page.
- Download the right archive for your platform.
- Extract the archive and find the
yardl
executable. Copy it to a directory in yourPATH
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:
- HDF5 with the C++ API, version 1.10.5 or later.
- xtensor, version 0.21.10 or later.
- Howard Hinnant's date library, version 3.0.0 or later.
- JSON for Modern C++, version: 3.11.1 or later.
Conda
If using the Conda package manager, these dependencies can be installed with:
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.
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:
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.