Lodestar is a lightweight C++11 framework for rapidly prototyping and deploying real-time control systems.

Lodestar aims to be a framework that provides directly executable code, unlike most modeling and simulation-centric toolboxes, which have not been tailored for use in real-time applications. At the same time, Lodestar also allows for code generation when performance is particularly important. It comes built-in with many compile-time checks that cover most common typos and bugs (i.e., matrix-vector dimensions mismatch, connecting inputs to inputs, etc.).

To this end, Lodestar adopts a function block description of systems, where each Block provides a pure function (i.e., one that only alters its internal state). Each of these block may have any number of inputs, parameters, and outputs. The resulting functional block diagrams can easily be extended with new user-defined block types, without incurring overhead.

Inputs --->| Block : f(Input, Parameters) -> Outputs |---> Outputs


  • Automatic resolution of circular data-dependencies (algebraic loops).
  • Transparent compile-time error checking, as well as run-time checks prior to executing code.
  • Easy extensibility with a simple yet powerful Block API based on template metaprogramming.
  • Clean C++ code generation with predetermined function execution order, as well as resolved data-dependencies.
  • Zero-overhead abstraction using templated classes; it does not matter if you have a thousand inputs, or just one.
  • Out-of-the-box networking support, with efficient serialization.
  • Automatic direct encryption and decryption of messages for enhanced security using state-of-the-art elliptic curve algorithms.

Getting Started


  • CMake
  • A C++11-compliant compiler
  • GiNaC (optional, for resolving algebraic loops)
  • nng (optional, for networking)


Simply clone the repository and build using CMake. If you just want to grab a static library, run cmake .. instead of a debug build.

Installing/disabling dependencies

You can install the dependencies as follows:

  • On Ubuntu (Debian):
    sudo apt-get install libginac-dev libcln-dev libnng-dev
  • On macOS:
    brew install ginac nng

You can disable GiNaC and NNG using the -DWITH_GINAC=OFF -DWITH_NNG=OFF flags when running the cmake command:


git clone
cd Lodestar
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
sudo make install

You can find some demos in the examples/ folder, as well as unit tests of different components in the tests/ folder.