Raw capture โ€” raw/celly.md


url: https://www.nuget.org/packages/Celly title: Celly โ€” Native C#/.NET Implementation of Common Expression Language (CEL) author: bsidio date_fetched: 2026-07-18 date_published: 2026-07-17


Celly

A native C#/.NET implementation of Google's Common Expression Language (CEL). Written from scratch in pure managed C# โ€” no WASM shims, no Go-compiled artifacts, no native library bindings.

Version: 1.2.0 (2026-07-18) | License: Apache-2.0 | Target: .NET 8.0+ Repository: https://github.com/bsidio/celly Documentation: https://bsid.io/celly/

Status

1.0 stable โ€” public API with snapshot testing, 100% conformance, and fuzz-hardened.

Conformance

Passes 2,456 / 2,456 (100%) of the official cel-spec conformance suite, spanning 30 test data files pinned at commit 59505c1, verified in CI across Linux, Windows, and macOS. A ratcheting skip-list (known-failures.txt) is now empty.

The conformance suite also runs strong_* enum sections with Celly's strong-enum mode.

Performance

Described as "the fastest .NET CEL implementation": - ~1.2ร— faster than Cel.NET - ~6โ€“9ร— faster than TELUS's Cel package - Far lower memory allocation than competitors - Within ~1.2ร— of the reference Go implementation (cel-go) on simple expressions - Faster than cel-go on comprehension-heavy expressions

Package Ecosystem (3 packages)

Package Contents Key Dependency
Celly Core: lexer, parser, macros, type checker, evaluator, standard + extension libraries None
Celly.Protobuf Protobuf types, well-known types, enums, proto2 extensions Celly, Google.Protobuf
Celly.Protovalidate protovalidate for .NET โ€” validates messages against buf.validate rules Celly, Celly.Protobuf, Google.Protobuf

Celly.Protovalidate passes 2,872 / 2,872 (100%) of buf's official protovalidate conformance suite.

Architecture

Zero-dependency core containing the lexer, parser, macros, type checker, evaluator, standard library, and all extension libraries.

Feature Checklist

Usage Example

var env = CelEnv.Create(new CelEnvSettings
{
    Declarations =
    [
        new VariableDecl("request", CelType.Map(CelType.String, CelType.Dyn)),
    ],
});
var program = env.Compile("request.user.startsWith('admin-') && size(request.groups) > 0");
var result = program.Eval(new Dictionary<string, object?>
{
    ["request"] = new Dictionary<string, object?>
    {
        ["user"] = "admin-alice",
        ["groups"] = new[] { "ops" },
    },
});

Why Celly

CEL is the expression language behind Kubernetes admission policies (ValidatingAdmissionPolicy), Envoy RBAC, Google Cloud IAM conditions, gRPC protovalidate, and more. Official implementations exist for Go, C++, Java, and Rust but not .NET โ€” which Celly fills.

Total Downloads: 174 (across 6 versions)

Versions: 0.1.0 (37), 0.2.0 (35), 0.3.0 (37), 1.0.0 (31), 1.1.0 (34), 1.2.0 (0)

NuGet Packages Depending on Celly

  1. Celly.Protobuf (145 downloads)
  2. Celly.Protovalidate (0 downloads)