|
parser 1.0.0
UTF-8 CEL expression compilation and checked library extensions
|
Note: This project is a temporary solution for using the CEL language from cel-rs in C++. This library will be deprecated when using the Rust implementations from C++ becomes viable.
Compile decoded UTF-8 std::string_view expressions once, then execute the owned programs on a reusable stack. This C++20 library supports a bool/f64 subset of CEL and lets you add client types and operations. JSON decoding belongs to your application.
Use CPM to build the parser and its runtime as static libraries with your application. After adding CPM to your project, declare the dependency and link your application target:
The build tutorial includes compiler prerequisites and configure/build commands. You do not need an installation, package prefix, or separate runtime checkout.
Include <cel/parser.hpp> to compile and execute a scalar:
The program prints 5. Numeric values require floating syntax: 2.0, not 2. Preparation binds the result type once; later calls reuse the program and stack.
Read these guides in order:
The generated documentation places grouped APIs under Reference and symbol lookup under Index. Build it with cmake --preset docs followed by cmake --build --preset docs, then open build/docs/html/index.html.