« All posts

Celly: A Pure Managed C# Engine for Google's CEL, 100% Conformant

Celly is a pure-managed, native C# implementation of Google's CEL passing 100% conformance tests — plus the first protovalidate library for .NET.

Celly is a native, pure-managed C# implementation of Google's Common Expression Language (CEL), the safe, side-effect-free expression language behind Kubernetes admission policies, Envoy RBAC rules, Cloud IAM conditions, and gRPC's protovalidate. CEL lets teams move policy logic out of compiled code and into data — expressions that are guaranteed to terminate and can't execute arbitrary code — but no official implementation existed for .NET before this project.

The engine was built under one strict constraint: no WASM, no native bindings, no compiled Go artifacts — the lexer, parser, type checker, and evaluator are all written from scratch in C#. That raised the correctness bar considerably, since there was no existing engine to lean on. Celly now passes all 2,456 tests in the official cel-spec conformance suite, verified independently through a separate audit and differential fuzz testing against cel-go with zero divergences.

On performance, Celly measures as the fastest CEL engine on .NET, meaningfully ahead of the next-best managed option, and on comprehension-heavy expressions it even outperforms cel-go, the reference Go implementation. The project also produced the first protovalidate library for .NET as a byproduct, and both are published on NuGet.