Warning: This is a development version. The latest stable version is Version 4.0.1.

Quick Start


You will need a valid license to access and use the library. For more information on how to obtain a license, visit https://steinwurf.com/license.

The following section will help you get started.

If you already installed a C++14 compiler, Git and Python on your system, then you can clone this repository to a suitable folder:

git clone git@github.com:steinwurf/rely.git

After cloning the repository you will have the latest development snapshot. Unless you need to work on the latest and greatest, it is recommend that you switch to the most current release of the library.

cd rely
git checkout |release|

Where |release| should be replaced with the latests release.

Using the Waf buildsystem

Waf is the primary buildsystem used at Steinwurf use this to build the library along with the tests, examples, and application.

Configure and build the project:

python waf configure
python waf build
python waf install --destdir=rely_install

The final install step will create a folder containing all the necessary files needed to use the library (e.g. static library, headers etc.). You can change the output folder by passing a different path to --destdir. You can also copy/move this install folder anywhere you like.

Use as Dependency in CMake

To depend on this project when using the CMake build system, add the following in your CMake build script:

add_subdirectory("/path/to/rely" rely)
target_link_libraries(<my_target> steinwurf::rely)

Where <my_target> is replaced by your target.

Build example

To create your first “hello world” program using rely you can try the following:

#include <iostream>

#include <rely/decoder.hpp>
#include <rely/encoder.hpp>
#include <rely/version.hpp>

int main()
    std::size_t max_packet_bytes = 1400U;
    int64_t timeout = 120U;
    std::size_t max_stream_size = 125U;

    rely::encoder encoder;
    rely::decoder decoder;

    encoder.configure(max_packet_bytes, timeout, max_stream_size);
    decoder.configure(max_packet_bytes, timeout, max_stream_size);

    std::cout << "version:           " << rely::version() << "\n";

    std::cout << "encoder" << std::endl;
    std::cout << " max_packet_bytes: " << encoder.max_packet_bytes() << "\n";
    std::cout << " header_bytes:     " << encoder.header_bytes() << "\n";
    std::cout << " timeout:          " << encoder.timeout() << "\n";
    std::cout << " max_stream_size:  " << encoder.max_stream_size() << "\n";

    std::cout << "decoder" << std::endl;
    std::cout << " max_packet_bytes: " << decoder.max_packet_bytes() << "\n";
    std::cout << " header_bytes:     " << decoder.header_bytes() << "\n";
    std::cout << " timeout:          " << decoder.timeout() << "\n";
    std::cout << " max_stream_size:  " << decoder.max_stream_size() << "\n";

    return 0;

To compile with g++ (if you installed to the rely_install local folder):

g++ main.cpp -std=c++14 -I rely_install/lib/includes -L rely_install/lib -lrely

The full of rely is available here API.