Documentation: https://micro-lf.org/
reactor-uc is the embedded runtime for micro-LF, bringing the reactor model of computation to microcontrollers and resource-constrained systems. It is built on Lingua Franca, a coordination language for deterministic concurrent systems.
Programs written in Lingua Franca compile to C and run on reactor-uc, giving you deterministic scheduling, pre-allocated memory (no heap allocation at runtime), and the ability to distribute work across multiple nodes through federated execution.
For more background on reactor-oriented programming see the Lingua Franca Handbook. For reactor-uc-specific docs see micro-lf.org.
- CMake and Make
- A C compiler (GCC or Clang)
- Java 17 (for the compiler)
- Linux or macOS
- Additional requirements depend on the target platform
git clone https://github.com/lf-lang/reactor-uc.git --recursive
cd reactor-uc
export REACTOR_UC_PATH=$(pwd)The quickest way to try things out is to run a program natively on your development machine:
cat > HelloWorld.ulf << EOF
@platform("native")
main reactor {
reaction(startup) {=
printf("Hello World!\n");
=}
}
EOF
./ulf/bin/ulfc-dev HelloWorld.ulf
bin/HelloWorld|
Zephyr template |
![]() RIOT template |
FreeRTOS template |
Raspberry Pi Pico template |
ESP-IDF template |
Patmos template |
POSIX (Linux / macOS) |
src/ and include/ — the runtime
ulf/ — the Lingua Franca compiler (ulfc) with the uC code generator
examples/ — example programs for each target platform
external/ — vendored dependencies (e.g. nanopb)
test/ — unit, platform, and integration tests
The runtime uses object-oriented C: a class is a struct with a constructor that populates its fields, methods are function pointers, and inheritance is achieved by placing the parent struct as the first field so parent and child pointers can be safely cast between each other. This allows child structs to override function pointers and achieve polymorphism.
We use clang-format 19.1.5 (the default on Ubuntu 24.04). Run it with:
make formatmake unit-test # unit tests
make lf-test # integration tests (requires the `timeout` utility — macOS: brew install coreutils)
make platform-test # platform tests
make examples # build and run all examples
make coverage # unit test coverage report
make ci # roughly the full CI flow (requires Zephyr venv, RIOTBASE, and PICO_SDK_PATH)reactor-uc draws on ideas and prior work from:
Developed by researchers from TU Dresden, UC Berkeley, DTU, and the University of Verona.
