# C++ bindings for libyang

![License](https://img.shields.io/github/license/CESNET/libyang-cpp)
[![Gerrit](https://img.shields.io/badge/patches-via%20Gerrit-blue)](https://gerrit.cesnet.cz/q/project:CzechLight/libyang-cpp)
[![Zuul CI](https://img.shields.io/badge/zuul-checked-blue)](https://zuul.gerrit.cesnet.cz/t/public/buildsets?project=CzechLight/libyang-cpp)

*libyang-cpp* implements object-oriented bindings of the [`libyang`](https://github.com/CESNET/libyang) library in modern C++.
Object lifetimes are managed automatically via RAII.

## Dependencies
- [libyang](https://github.com/CESNET/libyang)
  - for the minimal required version, check the [`CMakeLists.txt`](./CMakeLists.txt)
  - during development, our `master` branch is CI-checked against the `devel` branch of *libyang*
- C++23 compiler (e.g., GCC 13.x+, clang 16+)
- CMake 3.22+
- optionally for built-in tests, [Doctest](https://github.com/doctest/doctest/) as a C++ unit test framework
- optionally for the docs, Doxygen

## Building
*libyang-cpp* uses *CMake* for building.
One way of building *libyang-cpp* looks like this:
```
mkdir build
cd build
cmake ..
make
make install
```

## Usage

Check the [test suite in `tests/`](tests/) for usage examples.

## Contributing
The development is being done on Gerrit [here](https://gerrit.cesnet.cz/q/project:CzechLight/libyang-cpp).
Instructions on how to submit patches can be found [here](https://gerrit.cesnet.cz/Documentation/intro-gerrit-walkthrough-github.html).
GitHub Pull Requests are not used.
