Sodium-cxx is the C++ variant of the Sodium framework for Functional Reactive Programming (FRP).
There is a great book Functional Reactive Programming
from Stephen Blackheath and
Anthony Jones, which includes many examples based on the Java variant of Sodium.
This project aims to translate these examples to C++.
You find the original examples in the
Sodium repository.
You need C++ compiler tools for your platform (MSVC, MinGW, GCC, or Xcode, depending on platform) and CMake as the build system.
sodium-cxx requires Boost. E.g. on macOS you can install Boost with
brew install boost
Many of the sodium-cxx-examples require Qt 6. E.g. on macOS you can install Qt with
brew install qt
or you can use the official binary installers from the Qt Project.
sodium-cxx is provided as a submodule of this repository. The same is true for the Sodium FRP bindings for Qt, which are used for the UI.
Simply checkout the submodules with
cd /to/this/directory
git submodule update --init
cd /to/this/directory
cmake -B build -G Ninja .
cmake --build build
If you installed Boost or Qt in a non-standard location (that is not automatically found by CMake),
you need to include the path to Boost or Qt -DCMAKE_PREFIX_PATH="/path/to/boost;/path/to/qt"
in the first cmake
call.