Common Expression Language (CEL) is a non-Turing complete language designed for simplicity, speed, safety, and portability. The Common Expression Language (CEL) implements common semantics for expression evaluation, enabling different applications to more easily interoperate.
One of our mission-critical services at work is written in Rust and we needed a way to evaluate user-provided CEL expressions, so I took it upon myself to fork a partial implementation of the interpreter and start from there. The project already implemented a complete parser, and the basics of an interpreter, but there’s a long way to go to make it fully compliant with the CEL-spec.
I’ve been slowly whittling a way at the project in my spare time and so far have added support for the following:
has
, max
, map
, filter
, all
, and many more.Duration
and Timestamp
types with their associated methods and operators.Some of the problems and solutions were interesting enough to me that I plan to write a few blog posts about them. I’ll link them here as I write them.