Skip to content

Releases: clarkmcc/cel-rust

v0.7.0 - Serialize CEL Values

02 Apr 20:50
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.6.1...v0.7.0

0.6.1 - Fixed Type Equality and Map Indexing

20 Mar 20:26
Compare
Choose a tag to compare

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

Full Changelog: v0.6.0...v0.6.1

v0.6.0 - Support Serialize types and additional macros

17 Feb 02:35
2c8dd61
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.0...v0.6.0

v0.5.0 - Thread-safe Execution

01 Dec 23:24
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.4.1...v0.5.0

v0.4.1 - Fixed Operator Precendence

18 Sep 15:21
34c5aab
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.4.0...v0.4.1

v0.4.0 - Better Custom Functions

27 Aug 16:45
Compare
Choose a tag to compare

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.