CEL-Core: High-level API for the Common Expression Language
This crate provides a unified Env for working with CEL expressions,
following the cel-go architecture pattern.
Quick Start
use Env;
use CelType;
// Create an environment with standard library and a variable
let env = with_standard_library
.with_variable;
// Parse and type-check in one step
let ast = env.compile.unwrap;
assert!;
Architecture
The Env struct coordinates:
- Parser: Converts source text into an AST
- Checker: Type-checks expressions and resolves references
- Variables: User-defined variable declarations
- Functions: Standard library + custom function declarations
Modules
types: Core type system, AST, and declarationsparser: Lexer, parser, and macro expansionchecker: Type checking and overload resolutionext: Extension libraries (strings, math, encoders, optionals)
Proto Conversion
For proto wire format conversion (interop with cel-go, cel-cpp), use the
cel-core-proto crate which provides CheckedExpr and ParsedExpr types.