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
yardlexecutable. Copy it to a directory in yourPATHenvironment 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.
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:
pixi init my-project
cd my-project
pixi add cmake cxx-compiler hdf5 xtensor howardhinnant_date nlohmann_json
pixi shellThis 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:
conda install -c conda-forge cmake cxx-compiler hdf5 xtensor howardhinnant_date nlohmann_jsonvcpkg
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-dateCMake
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.