Business rule calculation engine with LUA script-based rules.
Before you start building the solution witch clang or g++, you need to install required dependencies.
- C++ compiler -std=c++17 or higher (g++ or clang)
- Make
- Pistache - REST framework for C++
- RapidJson
- Lua 5.3+ - for rule scripting
- Sol2/3 - C++ bindings for Lua (header only library)
- optional: luarocks install lsqlite3complete (only for running rule018.lua)
$ brew install pistache
$ brew install rapidjson
$ brew install lua
$ brew install luarocksDepending on Linux distribution use proper command to install dependencies.
Assuming you have already C++ compiler and make and all dependencies, build solution as follow:
$ make -f Makefile-macm1$ make -f Makefile-linuxThe rules are located in the rules/ directory.
bren is starting as foreground service on TCP port 2345 but using --port number you can pass other port.
$ ./business_rule_engine --port 12345test/ directory contains some simple examples. Service has been tested on Mac M1, Macbook Pro Intel, VoidLinux and ArchLinux.
MIT