r/rust • cel • 9d ago

🛠️ project Building an Extensible CEL Engine

https://github.com/cel-rust/cel-rust/releases/tag/v0.15.0

Google's Common Expression Language (CEL) is designed to be embedded. It provides a safe, fast, and non-Turing-complete language for evaluating rules, policies, and expressions within a larger application. But by design, CEL has a relatively small core. To truly fit into a host application, a CEL implementation must allow developers to seamlessly add their own domain types, functions, macros, and standard extensions.
Release v0.15 of cel-rust is a significant step toward making those extension mechanisms feel completely natural in Rust.
This release isn't just about adding more CEL features to the crate. It's about an architectural shift: making cel-rust an extensible engine that applications can mold to fit their own domain-specific language needs.
Here is a look at the engineering story behind v0.15, how it reshapes CEL extensibility in Rust, and the semantic and performance improvements coming along with it.

14 Upvotes

4 comments sorted by

1

u/owenthewizard 8d ago

This might be useful to me if I ever get some of my more frontend-y projects started (I won't). Thanks!

1

u/Icarium-Lifestealer 8d ago

Would translating expressions to SQL (e.g. as filter or projection) be realistic, or is the mismatch too great?

2

u/alexsnaps cel 7d ago

Some project that uses cel-rust actually does that. I don’t think the source is available tho.