Releases: clarkmcc/cel-rust
v0.7.0 - Serialize CEL Values
0.6.1 - Fixed Type Equality and Map Indexing
What's Changed
- Support heterogeneous comparisons for numeric types by @fore5fire in #37
- Support indexing maps with any valid key type by @fore5fire in #36
New Contributors
- @fore5fire made their first contribution in #37
Full Changelog: v0.6.0...v0.6.1
v0.6.0 - Support Serialize types and additional macros
What's Changed
- Implement string parser by @inikolaev in #24
- README: Fix links to examples by @progval in #29
- Expose Context.clone(...) method to external crates by @clarkmcc in #31
- Feat/serializer by @lfbrehm in #33
- Fixed missing
timestamp_nanos_opt
function by @clarkmcc in #35
New Contributors
- @inikolaev made their first contribution in #24
- @progval made their first contribution in #29
- @lfbrehm made their first contribution in #33
Full Changelog: v0.5.0...v0.6.0
v0.5.0 - Thread-safe Execution
What's Changed
- Support indexed-based map accesses by @clarkmcc in #27
- Supporting thread-safe execution by @clarkmcc in #22
Full Changelog: v0.4.1...v0.5.0
v0.4.1 - Fixed Operator Precendence
What's Changed
- Updated integer types from 32-bit to 64-bit by @hardbyte in #16
- Fixed operator precedence #19 by @clarkmcc in #20
Full Changelog: v0.4.0...v0.4.1
v0.4.0 - Better Custom Functions
This release was focused on making it easier to create and register user-defined functions for use in the interpreter. Previously, user-defined functions had to work directly with the internals of the interpreter to load arguments, resolve expressions, and handle errors. This was verbose, repetitive, and not easy for someone unfamiliar with the internals of the library. This release adds Axum-style magic function parameters that allow you to register almost any function or closure using primitives supported by the CEL interpreter. For example, a function that adds two numbers:
Before | After |
fn add(ftx: FunctionContext) -> ResolveResult {
let arg1 = ftx.resolve_arg(0)?;
let arg2 = ftx.resolve_arg(1)?;
Ok((arg1 + arg2).into())
} |
fn add(a: i32, b: i32) -> i32 {
a + b
} |
Notice how:
- Error handling for missing args is handled implicitly
- Error handling for wrong types is handled implicitly
- The return type can be any supported primitive
The hope is that this approach will make custom functions more approachable.