A non-Turing complete expression language for fast, safe, and portable evaluation with C-like syntax.
CEL-Go is a Go implementation of the Common Expression Language, a non-Turing complete language for evaluating single expressions with a focus on safety, speed, and portability. It solves the problem of embedding lightweight, secure expression evaluation in applications where full scripting languages are too heavy or risky, such as policy enforcement, configuration validation, or access control rules.
Developers building applications that require safe, embeddable expression evaluation, such as policy engines, configuration systems, or validation frameworks, particularly in Go-based services.
Developers choose CEL-Go because it offers a predictable, linearly scalable evaluation model with strong safety guarantees, avoiding the overhead and risks of sandboxed Turing-complete languages while providing a familiar C-like syntax and robust tooling for type-checking and partial evaluation.
Fast, portable, non-Turing complete expression evaluation with gradual typing (Go)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Non-Turing complete design ensures expressions are side-effect free and evaluation costs scale linearly with expression size, making it ideal for security-sensitive applications like policy enforcement.
Syntax is nearly identical to C++, Go, Java, and TypeScript, as shown in the README examples, reducing the learning curve for developers from these backgrounds.
Supports gradual typing with static type-checking for early error detection and performance optimization, with first-class support for JSON and Protocol Buffers.
Handles unknown inputs using commutative logical operators, allowing evaluation with incomplete data and generating residual expressions, as detailed in the partial state truth table.
Lacks full programming constructs like unbounded loops or recursion, restricting it to expression evaluation only, which may not suffice for complex logic needs.
Some tests and features, such as dynamic proto support, require Bazel instead of standard Go tooling, adding setup overhead beyond typical Go projects.
Type-checking is optional but strongly encouraged, adding computational cost during compilation that might be unnecessary for simple runtime evaluations.