A Rust implementation of the Common Expression Language (CEL) for lightweight, safe expression evaluation.
cel-rust is a Rust implementation of the Common Expression Language (CEL), a non-Turing complete language designed for lightweight expression evaluation. It provides a safe, sandboxed environment for evaluating expressions in Rust applications, solving the need for performant and secure expression parsing without the overhead of a full scripting language.
Rust developers who need to evaluate user-defined expressions, rules, or conditions in their applications, particularly in contexts where safety, performance, and simplicity are critical.
Developers choose cel-rust because it offers a robust, specification-compliant CEL interpreter in Rust, combining the safety of a non-Turing complete language with Rust's performance and memory safety, making it ideal for high-stakes environments like policy evaluation or configuration parsing.
Common Expression Language interpreter written in Rust
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements the official Google CEL specification, ensuring compatibility with expressions used in ecosystems like Kubernetes or Google Cloud, as stated in the key features.
Non-Turing complete nature prevents infinite loops and uncontrolled resource consumption, making it safe for sandboxed evaluation in high-stakes environments.
Uses C-like syntax resembling C++, Go, Java, and TypeScript, reducing the learning curve for developers, as highlighted in the README's philosophy.
Supports custom functions and variables, enabling tailored expression evaluation, demonstrated in the examples for variables and functions.
Allows compiled programs to be executed concurrently in multiple threads, enhancing performance in multi-threaded applications, as shown in the threads example.
Version 0.13.0 indicates pre-1.0 status, which may involve breaking changes and incomplete features, as typical with libraries in active development.
Tied to the Rust ecosystem, making it unsuitable for projects in other programming languages without complex integration or language bindings.
Compared to established expression languages, cel-rust has a smaller community and fewer third-party tools, such as debuggers or IDE plugins.
Requires compiling programs and managing Context objects, which can be more involved than simpler alternatives like regex parsing or built-in eval functions.