IceFlow NDN-based stream processing library written in C++
|
IceFlow can be built either using a manually configured build environment, see Using systemwide libraries, or using the preconfigured Nix environment, see Using Nix.
In this document, you can find a detailed walkthrough on how to build and install IceFlow and its dependencies for Ubuntu and macOS.
In order to compile and run IceFlow, we need the following dependencies installed on our system:
The ndn-cxx library is the most important dependency for IceFlow, as it provides the fundamental NDN capabilities.
Under Ubuntu, you can install the requirements from the terminal using the following command:
Under macOS, you can also install the requirements from the terminal using homebrew:
Now we are set for building ndn-cxx.
You can then follow the instructions for building ndn-cxx as a shared library.
After the ndn-cxx installation is complete, you can install the NFD by following its build instructions.
After the installation is complete, you can check if the NFD is running by typing:
If it runs successfully, you can stop it with
To install PSync, first clone its Git repository using
Then you can perform the installation by following the respective instructions.
To install nlohmann-json using a package manager like homebrew, you can follow the official instructions.
On Ubuntu, you can perform the installation via a PPA.
To add it, type
Afterward, you can install the nlohmann-json3-dev
deb package as follows:
Under most Linux distributions, you will need to build yaml-cpp from source.
Under macOS, you can install it using Homebrew:
To verify that all dependencies are in place, you can use the following commands under Ubuntu:
Under macOS, you can use the following equivalent commands:
After asserting that all dependencies are available, you may continue with building and installing IceFlow.
Nix is a declarative package manager that allows for easily reproducible development environments created from a description file written in the Nix programming language. For more detailed information regarding Nix, see https://nixos.org/. IceFlow developers might also want to refer to our developer documentation regarding the nix configuration, which can be found in Nix-Developer-Guide.md.
For the purposes of IceFlow development, the IceFlow Nix environment can be considered as a rough equivalent to virtualenvs in Python.
In order to compile and run IceFlow using Nix, the following system requirements must be fulfilled:
There are two ways that you can enter the IceFlow Nix environment: You may either enter the Nix environment manually, or automatically using direnv (if installed).
To enter the IceFlow development environment, you can run the following command from the root directory of the IceFlow repository:
If you already enabled the nix-command
and flakes
experimental features in your nix.conf
, this command can be shortened to:
Note: Using --impure
is required by devenv.sh, which is the Nix-based tool used to manage the development shell.
Entering the environment for the first time might take a while, as it will download (and compile) necessary dependencies as well as required tools (compiler, linker, etc.).
After entering the Nix shell, you may continue with building and installing IceFlow.
Assuming that you have already installed and configured direnv, you may also use the IceFlow .envrc
. On entering the root directory of the IceFlow repository, you will be prompted to allow using the .envrc
file (after checking its content for maliciousness), which can be done using the direnv allow
command.
After doing so, the Nix environment will be entered automatically when entering the directory. Entering the environment for the first time might take a while, as it will download (and compile) necessary dependencies as well as required tools (compiler, linker, etc.).
After entering the Nix shell, you may continue with building and installing IceFlow.
Before building and installing IceFlow, you will need to generate the build files using CMake. To do so, simply enter
in the repository's root directory.
To compile all the IceFlow applications that are currently defined in the src
directory, run the following commands:
To install IceFlow as a library on your system, run
after generating the build files. For now, IceFlow only supports static linking, as it is not compiled to a shared library. This will probably change in future IceFlow versions.